9

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?

1
  • 4
    Run method reference Commented Oct 30, 2012 at 15:48

1 Answer 1

16

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
Sign up to request clarification or add additional context in comments.

1 Comment

Antivirus will not like this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.