I am trying to run the following code in vbscript:
ReturnCode = WshShell.Run("C:\Program Files\Virtutech\Simics 4.2\Simics 4.2.9\x86-win32\bin\simics.exe", 0, True)
I get an error when I run this script saying it cannot find the file. I think the problem is spaces in the path, but I don’t want to reinstall this application to a different path. How do I get around this?
EDIT: Also, I need to be able to put arguments after the executable. Do the arguments go inside the quotes or outside?
You can get around this by surrounding the path in quotes. But to do so, you need to escape them correctly(with
"), so:EDIT: Keep the path in double quotes and add around them as necessary: