0

I'm trying to run script below. The first program start up just fine but the second one with the blank spaces in the path name doesn't. How can this be resolved? Thanks.

    Set Shell = WScript.CreateObject("WScript.Shell")
    Shell.Run "cmd /n,C:\Windows\System32\", 4, False
    Shell.Run "sublime_text /n,C:\Program Files\Sublime Text 3\", 4, False
Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
Achaibou Karim
  • 502
  • 4
  • 6
  • 3
    Possible duplicate of [VBScript: How to call Run() with parameters](http://stackoverflow.com/questions/15025843/vbscript-how-to-call-run-with-parameters) – Thomas Dickey Jan 03 '16 at 18:45

1 Answers1

-1

Solved it by following link below. I rewrote the last statement with 3 double quotes.

How to call Run() with parameters

Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run "cmd /n,C:\Windows\System32\", 4, False
Shell.Run """C:\Program Files\Sublime Text 3\sublime_text.exe""", 4, False
Community
  • 1
  • 1
Achaibou Karim
  • 502
  • 4
  • 6