Closing a Dos window

How can I close a dos window within Vb after it has quit running?
searAsked:
Who is Participating?
 
mark2150Connect With a Mentor Commented:
Right. Set the properties of C:\COMPRESS.EXE to "Close on exit" and it'll fold the tent when it's done.

M

0
 
mark2150Commented:
You need to set the properties of the program to "Close on Exit"...

M

0
 
searAuthor Commented:
I don't think this is the answer I'm looking for. I want to be able to run a program from vb such as
shell("c:\compress.exe setup.exe setup.ex_") and when the program is finished I want it to close automatically.
Jr.
0
 
searAuthor Commented:
Thank you does exactly what I want.
0
 
mark2150Commented:
If you set the property to "Run minimized" you'll not see a DOS window while it's flying either...

I have ExecCmd function code that *waits* for child to finish before letting your code continue. SHELL is a async process and parent continues to fly while child runs. Sometimes is good, sometimes is not if you need data that child will produce.

If you need ExecCmd source hit me direct at mark_lambert@ntsc.navy.mil

M

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.