Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run without Dos box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00139702
Message ID:
00141199
Vues:
24
>>I remember seeing a technique for doing a RUN command without seeing the DOS window pop up.
>>I want to synchronise a client pc to the NT server using
>>
run /n net time \\server /yes
>>but not see the box.
>>BTW, is there another way of doing this seemlessly?
>
>Hi Daivd,
>
>I think we can get you what you want, without much trouble. First, create a shortcut file to a batch file to execute the DOS program you need to use. Open the shortcut's properties dialog, and on the "Program" tab select minimized (just to be sure) and check the "Close on exit" check box. Then, after loading FOXTOOLS.FLL:
>m.shllexec = RegFN("ShellExecute", "I@C@C@C@CI", "I", "SHELL.DLL")
>m.op = "open"
>* Replace this with the acutal name of your shortcut file
>m.filename = "SHORTC~1.PIF"
>m.parms = ""
>* Replace this with the actual directory the executable
>* is in
>m.dir = SYS(5) + SYS(2003)
>m.result = CallFN(m.shllexec, 0, @op, @filename, @parms, @dir, 0)
>A return value of greater than 32 indicates that it worked. The last zero parameter in the call will cause the window to be hidden and it will be automatically close. I tested this using a batch file to list a directory to a file, and it worked perfectly.
>
>hth,

Yes, I think that was something like what I remember
Thanks
A big thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform