Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding the DOS Command Prompt
Message
From
25/09/2002 11:34:23
 
 
To
02/08/2002 06:34:05
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00682911
Message ID:
00704291
Views:
28
>>>hello everybody,
>>>
>>>how could I hide the DOS Command Prompt that pops up when I run a DOS command in my VFP program?
>>>
>>>Thanks very much,
>>>Jimi
>>
>>Take a look at file #9477. It allows to run command hidden.
>
>Seems it can only run a program hidden, but cant run DOS command such as "copy"
>or just i'm missing something? anyway, I tried to use xcopy.exe instead of copy, it seems good.

Actually, you can run COPY; you have to realize that it's a DOS internal comand, though, and as such, there is no COPY.EXE or COPY.COM to invoke. You either need to incorporate the COPY command into a batch file, so that the DOS CLI will process it rather than CreateProcess() attempting to launch it on its own, or explicitly invoke a new command processor for the copy command, as shown below:
COMMAND /C COPY MyFile.Foo YourFile.Bar
>
>But then i have another problem: since my task is to copy some files to a folder and zip them, i have to wait until all files are copied before zipping. I used LaunchAppAndWait() for this, however, the program does not aware that xcopy is finished even after all files are copied, until the user press "Esc". This problem only occurs when using xcopy, it can waits and works again in correct timing when i test with other program (e.g. pkzip)
>
>Any idea?
>
>Thanks a lot!
>Jimi
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform