Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wscript.shell and windows 98
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00587161
Message ID:
00587202
Vues:
40
>>>>I am seeing different behavior for a run command using wscript.shell in windows 95 and windows 98 and windows 2000 in a VFP 7 application.
>>>>
>>>>I set the dos window to close automatically in the wscript command. It closes automatically in win 95 and win2000 but not in win 98
>>>>
>>>>Code looks like this:
>>>>
>>>>lcTimeServer='lanfin-nts-pfs1'
>>>>lcRun = "net time \\" + lcTimeServer + " /set /y"
>>>>
>>>>o = CREATEOBJECT('wscript.shell')
>>>>o.Run(lcRun, 1, .T.)
>>>>RELEASE o
>>>>
>>>>
>>>
>>>Try to use VFP Run Command
RUN /2 &lcRun
>>
>>Sergey,
>>
>>From the WSH command, she wants the caller to wait for completion.
>
>I missed that. BTW, I ran above code and it didn't close DOS window on my WIN98SE PC either. The workaround could be to open proiperties of this dos window once, check 'Close on Exit' and OK. Next time it'll close.

Or run a pif file passing a parameter and indicating close on exit in the editor.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform