When you do ...
Set WshShell = CreateObject("WScript.Shell")
Call WshShell.Run("psexec -u administrator -p pw1234 cmd /c ipconfig > C:\Output.txt", 2, True)
... you see for a short time the command prompt window.
I've been searching the web and I've tried everything I could possibly think of to hide/minimize this window, but unfortunately without success.
Is there really no way to run psexec in a hidden/minimized window?
PS: Unfortunately Call WshShell.Run("psexec -u administrator -p pw1234 start /min cmd /c ipconfig > C:\Output.txt", 2, True)
doesn't work (error message: PsExec could not start start ...).
Set WshShell = CreateObject("WScript.Shell") WshShell.Run "psexec cmd /c ipconfig /all > Output.txt",0,True
-u administrator -p pw1234
the command prompt window is now only visible for a very very short time, but it still appears. If you use the whole commandWshShell.Run "psexec -u administrator -p pw1234 cmd /c ping 8.8.8.8 -n 5 > C:\Output.txt", 0, True
the command prompt window is still visible for a longer time, isn't it?