S
S
saniks2019-09-08 12:48:34
PowerShell
saniks, 2019-09-08 12:48:34

How to insert %appdata% environment variable into script?

Tell me how to correctly insert the %appdata% environment variable into the powershell script?

PowerShell (New-Object System.Net.WebClient).DownloadFile('https://site.com/installer.msi','%APPDATA%\installer.msi')

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Mezhuev, 2019-09-08
@saniks

$env:APPDATA

A
azarij, 2019-09-08
@azarij

"$env:appdata\installer.msi"
quotes must be double here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question