one of the exe suppose(c:\Program Files\abcd\123.exe). it will run when we will double click on the exe. but not rnning with vbscript.

error : the sysstem can not find the file specified

code : 80070002


notepad.exe is working instead of 123.exe. any suggestion ...

2 Comments   [ - ] Hide Comments


  • Windows 7? Is it prompting for UAC, if your supressing it, you might not see the UAC prompt.
  • Looks like a problem in the executable path in vbscript..
Please log in to comment

Community Chosen Answer



Clue: Your executable path has a space in it...

Answered 08/27/2013 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity



VBScab is right.. Put some Quotes "" "around your path".. Otherwise the path = C:\Program and not C:\Program Files\abcd\123.exe

Answered 08/27/2013 by: ekgcorp
Tenth Degree Black Belt

  • Try something like

    pathStr = Chr(34) & "C:\Program Files\abcd\123.exe" & Chr(34)

    and run pathStr to have the quotation marks where they belong.
    I usually include those quotation marks by default since they don't disturbe even when they are not needed (in paths with no spaces).
Please log in to comment