HOWTO: Close Shelled Process When Finished under Windows 95/98ID: Q145701
|
When the Visual Basic Shell command is used to execute a batch file or MS- DOS program on Windows 95 or Windows 98, the MS-DOS window remains open by default when the program is done executing. Under Windows 3.1, Windows for Workgroups 3.11, and Windows NT 3.51, the MS-DOS window closes by default when the program is done executing. This article shows how to force Windows 95 or Windows 98 to close the MS-DOS window when the program is done executing.
To force Windows 95 or Windows 98 to close the MS-DOS window you can use
the Visual Basic Shell function with the /C option of COMMAND.COM. The /C
option of COMMAND.COM will close the MS-DOS window under Windows 95 or
Windows 98. The Visual Basic syntax for using the /C option of COMMAND.COM
to execute a MS-DOS program is as follows where <pathname> is the path and
name of the program to execute and any command line options for it:
h = Shell("COMMAND.COM /C <pathname>")
Additional query words:
kbVBp400 kbVBp kbDSupport kbdsd createprocess kbVBp600 properties close
on exit kbNoKeyWord kbvba kbVBp500
Keywords :
Version : WINDOWS:4.0,5.0,6.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: May 25, 1999