Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

VBScript elevated command with output to file

$
0
0

Hi All,

I am trying to run the following test.vbs
However after the script run successfully the text file is always blank. Any ideas why the output is not saving in the text file?

Code is below:

Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "cmd.exe", "/k manage-bde -protectors c: -get -Type recoverypassword > c:\output.txt", "", "runas", 0


Viewing all articles
Browse latest Browse all 15028

Trending Articles