Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSH Run command with space in file path
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
WSH Run command with space in file path
Miscellaneous
Thread ID:
00356898
Message ID:
00356898
Views:
64
I'm getting an OLE error if I use Windows Script Host. This only occurs if the path to the exe to be run has a space in it. Does anybody know of any reason.

The code is basically like this:-
lcFileName=GetProgToRun()
loShell=CreateObject("wscript.shell")
lnResult=loShell.Run(lcFileName, 1, .T.)
This works perfectly well if there is no space in the file name. The exe file is definitely there as this is validated before running.

TIA,
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Next
Reply
Map
View

Click here to load this message in the networking platform