Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to suppress DOS Window while using commands such as
Message
 
 
À
20/03/2005 20:19:02
Freddie Rodrigues
Bitrun Business Solutions
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00997732
Message ID:
00997734
Vues:
9
This message has been marked as the solution to the initial question of the thread.
The second parameter in the WSH Run method is window type. Passing 0 would hide the window. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp for details.
lnSuccess = loShell.Run(lcCmd,0,.t.)
You can also use API_APPRUN in .VCX form File #9477

>How can I suppress the DOS window from poping while using DOS commands [command line], in my programs.
>
>This is the code that I have been working with. It does the job, but keeps poping the Dos Window throughout my commands.
>
>
>* mdir    is the directory variable
>* zipfl   is the zip file name variable
>
>mtopdir = subs(mdir,1,at('\',mdir)-1)
>mtopfls = subs(zipfl,1,at('.',zipfl))+'top'
>
>*** Either OF these
>!zip &mtopfls &mtopdir\*.* >BitRun.bak
>*** Or
>=ShellBackup([zip &mtopfls &mtopdir\*.* >BitRun.bak])
>***
>
>FUNC ShellBackup
>Para lcCmd
>loShell = CREATEOBJECT("wscript.shell")
>lnSuccess = loShell.Run(lcCmd,1,.t.)
>
>
>Thanks
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform