Powershell > output on specific path -
i have make script in powershell :
$msbuild = "$env:appdata\usbsave\usb.exe" $arguments = " -w " start-process $msbuild $arguments
the script works, output file (out.txt), appears on desktop.
how can save output file $env:appdata\usbsave\ ?
i assume console prompt pointing desktop. simple solution change directory before calling process.
$msbuilddir = "$env:appdata\usbsave" set-location $msbuilddir $msbuild = "$msbuilddir\usb.exe" $arguments = "all -w" start-process $msbuild $arguments
i consider usb.exe have switches define output. more commonly associated virus seems utility.
was going mention -workingdirectory
start-process
tony hinkle beat me it.
Comments
Post a Comment