Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone know how to execute a DOS file from within W2k, that will close the window after the program has been executed?
5 replies
by soreloser
Use Windows Scipt Host.
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, TRUE)
Put this into a file called MyScript.vbs (or whatever you would like to call it).
You can execute it from the command line by cscript MyScript.vbs, or wscript MyScript.vbs. This will open notepad with the contains for the MyScript.vbs file.
by ncobb
The question was auto-closed by TechRepublic
by rawright
Run the program from a batch file, using EXIT as the last line in the file. This should close the DOS window and restore the desktop.
by ncobb
The question was auto-closed by TechRepublic
by ncobb
This question was auto closed due to inactivity
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending
0 helpful
13 replies
Question
Is WSL still relevant in 2026?
0 helpful
1 reply
0 helpful
2 replies
0 helpful
10 replies
Question Unanswered
i need help in transferring my bulk emlx files
0 helpful
0 replies