OK This is getting ridiculous, I am still having problems with formatting a SHELL command. I am trying to pipe output of an .exe file to a text file. Problem is Symantec Livestate Recovery requires it's command files to include FULL paths.
Even the piped output path needs to be a full path.
This code works:
Code:
SetOption("WrapAtEOL","ON")
$LSPath = "C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\"
$g='%COMSPEC% /C "' + $LSPath + 'pslist.exe" > pslist.txt'
? $g
SHELL $g
This does not:
Code:
SetOption("WrapAtEOL","ON")
$LSPath = "C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\"
$g='%COMSPEC% /C "' + $LSPath + 'pslist.exe" > "'+$LSPATH+'pslist.txt"'
? $g
SHELL $g
I get this damm message saying:
Code:
C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Can someone please help me ??