
WSH Run does recognizes only short DOS convention file path names
If the path contains any spaces, enclose the path in quotes. In a literal string, an embedded quote
is represented as 2 quotes. You can also use Chr(34) which returns a quote character.
shell.run """c:\program files\myexe.exe"""
or
shell.run chr(34) & "c:\program files\myexe.exe" & chr(34)
--
Michael Harris
Microsoft.MVP.Scripting
--
Please do not email questions - post them to the newsgroup instead.
--
Quote:
> When the WSH Run method is used with a file path specification that includes
> spaces,
> such as "c:\program files\myexe.exe" the Run method fails. If the path is
> changed to:
> "c:\progra~1\myexe.exe" the method is successful.
> The WHS error message says ".. cannot find file.."
> How do you call Run with long file path names?