Prevent VBscript app from showing Console Window
I have a VBScript app which create Symbolic Links.
Set wshell = CreateObject("WScript.Shell")
.....
linkcmd = "mklink /D """ & linkFolderPath & "\" & linkName & """ """ & libfolder & "\" & folderName & """"
cmd = "cmd /C " & linkcmd
wshell.Run cmd, 4, true
This is fine and works, but when I create a lot of links, each execution of the wshell.Run
command results in a transient console window appearing and promptly vanishing.
Is there anyway to prevent the console window from being created so visibly?
Solution 1:
You can use this VBScript to run cmd commands hidden, just incorporate it into your script:
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "cmd /c yourcommands", 0, True