Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to wait for completion of shellexec ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00739175
Message ID:
00746369
Vues:
23
That's one of the reasons I prefer the API for this sort of thing - when you distribute Wscript, you have to have the right version of Wscript for the right OS, etc(IOW, kind of a headache). The API is pretty consistent across OSs. If you want to go back to the API, try Ed's APIRun in downloads or use the combo of WaitForSingleObject/CreateProcess, which ShellExec is based on, explained at: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191584
>>In addition (correction: Shell object, not VBScript... misspelled).
>>Try the following code:
>>
>>sll = CreateObject("WScript.Shell")
>>lcCmd = '"C:\program files\Microsoft Office\Office10\excel.exe"'
>>cmdReturn = sll.Run(lcCmd, 1, .T.)
>>
>>VFP window is available, but user input is locked.
>
>Works fine on my XP machine. When I went to install it on a Win98 machine, at my client's place, it gave me error 1426 as soon I try to create the Wscript.shell object. I downloaded it from microsoft and still the error is there. Any suggestionh ?
>
>Thanks
>Eric
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform