How to Make Wshell.Run "cmd.exe ..." Execute in a Hidden Window
Posted on 2004-10-01
I need the following VBS code to start cmd.exe in either a minimized window or a hidden window:
Wshell.Run "cmd.exe /C" & chr(34) & "reg.exe query " & regPath & " /s >>" & filePath & chr(34),1,True
I tried adding vbHide to the end of the line, but Wshell.Run doesn't like it. I also tried adding some extra perameters to the cmd.exe call, but those didn't help either.