Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wsh and LFNs with long parameter statements
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00685096
Message ID:
00685133
Views:
17
>>>>Hi UTers,
>>>>
>>>>How would I run the following utilizing the scripting host:
>>>>
>>>>%systemroot%\mycio\agent\HtmlDlg.exe -Url="myui://ScanNow.htm" -ResDll="myScnUi.Eng" -Param="ScanObject,VT_BSTR,C:\mydir" -Caption="VirusScan ASaP"
>>>>
>>>>set WshShell = Wscript.CreateObject("WScript.Shell")
>>>>WshShell.run(*)
>>>>* is the long line above that starts with %systemroot
>>>>
>>>>Also... in vfp ' " ' is legal. That is: we can surrond a double quote with single quotes or even brackets. What is the equilvalent in VBScript
>>>
>>>Dr. G.
>>>
>>>Assuming, lcfilename is something like: "C:\Program Files\My Long Path\Myexe.exe" the syntax for the run command would be either
oShell.Run Chr(34) & lcfilename & Chr(34)
or
oShell.Run """ & lcfilename & """
I prefer the former as it's easier to read.
>>
>>Hi George,
>>
>>Thanx for the chr(34) tip. How would you script for a run of:
>>%systemroot%\mycio\agent\HtmlDlg.exe -Url="myui://ScanNow.htm" -ResDll="myScnUi.Eng" -Param="ScanObject,VT_BSTR,C:\mydir" -Caption="VirusScan ASaP"

That worked, Thanx
Neil
>>
>>
>Hi Neil,
>
>I'm not exactly sure what's what in the above. For the sake of simplicity, however, I'd assign the application to be executed to one string and the parameter list to a second, which would begin with a space. Wherever an LFN is involved, surround that with double quotes, if this makes sense.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform