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:
00685124
Vues:
18
>>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"


Neil
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform