Completely invisible batch file.
I am trying to schedule a batch file to run completely invisible to the end user via KACE. It is running ok, but no matter what I try, it pops up a command prompt window for about a second. I have an invisible.vbs file that runs it completely invisible if I run it locally, and I have added it as a dependency on the KACE Script. Any help would be greatly appreciated.
The invisible.vbs script is this:
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
My KACE script is this:
wscript.exe "invisible.vbs" "myfile.bat"
Community Chosen Answer
There is no way to do this with a batch file alone. however if you truly require your batch file to not popup a window you can create and run the following vbs script to do exactly what you want
Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & "yourfile.bat" & Chr(34), 0
Set WshShell = Nothing
Copy the lines above to Notepad and save the file with . extension. Now you just have to copy both files and call the vbs script.