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!

Closing the DOS window when running a launch script

Status
Not open for further replies.

looslib

Technical User
Feb 9, 2011
10
US
In an XP script to launch a program, we would do:

"C:\Program Files\Parametric\bin\parametric.exe"

and the program would launch and the window would close.

In Win7, the window stays open unless we do this:

start "Program" "C:\Program Files\Parametric\bin\parametric.exe"

What has changed in Win7 that requires the start command and the "Program" naming?

 
This TechNet post mentions that "unlike on other recent releases of Windows, on Windows 7 each 16-bit and MS-DOS-based application runs as a thread within a single virtual machine" which implies that there were quite a few changes to how DOS was emulated on Windows 7. It's not implausible that they also changed the command processor to not complete until it receives an exit code.

Nelviticus
 
Try this for the heck of it - worked in XP when a DOS box didn't want to close:

In a batch file using START
start "" "C:\Program Files\Folder\application.exe"

and the batch file will close right after application.exe is loaded.


No guarantees (and I can't test it for you), but give it a shot.
 
what about doing it through powershell


MCITP:EA/SA, MCSE, MCSA, MCDBA, MCTS, MCP+I, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top