Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell command 1

Status
Not open for further replies.

renniw1

Technical User
Jan 21, 2003
7
0
0
US
Hi,
When I run a command using the Shell command, ms dos window pops up, runs the command and then closes. It is possible to prevent the automatic closing of the msdos window. Thanks.

G. Rush
 
Try something like

procId = shell(&quot;cmd /K <your command string>&quot;)

cjw

 
Just something to share, not a general fact,
try editing the PIF file. Untick the &quot;Close on exit&quot;.

The PIF file is usually created by Windows after running a DOS program. The program is loaded in its own window (ALT+ENTER to toggle screen) and you should find in the toolbar the Properties button. It's the easiest method I'm using for my VB apps with DOS report progs.

Hope this helps. [peace]
 
Letting you know above that I used part of SonOfEmidec1100's response b/c I was surfing for a way to change a file's attributes to not hidden and then back again because the kill command won't work if a file is hidden. Thanks all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top