8

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?

BonyT
  • 10,750
  • 5
  • 31
  • 52
  • 4
    [`Run` method reference](http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx) –  Oct 30 '12 at 15:48

1 Answers1

14

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
wOxxOm
  • 65,848
  • 11
  • 132
  • 136
Bali C
  • 30,582
  • 35
  • 123
  • 152