Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wsh and LFNs with long parameter statements
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00685096
Message ID:
00685133
Vues:
16
>>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform