PDA

View Full Version : wshshell.run doesn't work (W2K)



Ryan007
01-23-2003, 07:57 AM
When I run wshshell.run to an exe in one of my environment paths (i.e. %windir%\notepad.exe or c:\winnt\notepad.exe). The command works as expected. However if I try to run another program such as adobe reader (C:\Program Files\Adobe\Acrobat 5.0\Reader\acrord32.exe), it fails and gives me:
Error: The system cannot find the file specified.
Code: 80070002
Source: (null)

Has anyone run into this before?

Thanks

adamdelves
01-23-2003, 10:57 AM
WSHShell.run is just like the windows Start Menu=>Run command. If you type a file / dir path which conatins spaces it must be inside quotation marks.

Try:

wshshell.run """C:\Program Files\Adobe\Acrobat 5.0\Reader\acrord32.exe"""

Ryan007
01-23-2003, 11:17 AM
Yes that worked!!!

Thanks a lot.