Find the solution
Close on exit enabled
Source PictureOne way is to right-click the batch file and set it's
properties. window and to close when finished.
The act of setting properties will create a separate "pif" file.
From then on, any time you run the batch file, the settings will
be honored. So that means you have to save the "pif" file aswell with the "bat"file
Another way is to start the batch file with the START
command using the /MIN option. This has other
interesting consequences... The batch file will run as
a separate process. You may also need to use the /WAIT
option if you need to synchronize the batch file with
something that has to happen after the batch file. Type
"start /?" at a DOS prompt for more info. The NT/XP/2000
START command has lots of cool options, while the 95/98
command has little more than I've described. Keep in
mind that the START command will have it's own DOS
window! So running your batch file with "/min" but
without "/wait" will cause the START command to very
briefly pop up a DOS window, then be replaced by your
batch file running minimized.
The coolest way is to make the batch file run totally
invisibly. This is just a little dangerous because your
batch file MUST be able to close itself and MUST never
produce an error which might require user input.
Otherwise the batch file will hang invisibly until
system shutdown or until someone kills it with the task
manager. To do this trick REQUIRES that you have Windows
Scripting installed. Scripting is standard on Win98 and
newer, and is an optional free download for Win95. To
test, type "wscript" in the Start/Run dialog. If you get
a settings dialog, you have it. If you get an error or
Windows offers to find it for you, you don't have it.
See my scripting web page for more info:
http://www.ericphelps.com/scripting/index.htmSave this one line of text as "invisible.vbs":
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
To run any program or batch file invisibly, use it like this:
wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"
------------------------
http://www.ericphelps.com