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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding dos window of running batch file 1

Status
Not open for further replies.

owenm84

Programmer
Oct 20, 2003
8
0
0
US
I put a batch file in the registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

so it will run when a user logs on.

is there a way to have this run in the background, so that the black dos window doesn't appear?

thanks in advance...
 
Have the key refer to a shortcut to the batch file.

Then in the Properties of the shortcut, have the program run minimized.
 
I think this will still show the process on the taskbar.

I'd like to have it completely in the background if possible.

Is there a way to do this?

 
Windows scripting scripts (VBS files) run invisibly when they are run by the "wscript.exe" program (which is the default way to run them in Windows). So instead of having your registry entry point to your batch file, have it point to a script. Have the script run the batch file.

Here's a simple one-line VBS script (give it any
name with a VBS file extension) that will run
your batch file invisibly. All you have to do is
replace the name of the YOURFILEBAT with your batch file name:

invisible.vbs
rem ----------------------
CreateObject("Wscript.Shell").Run "YOURFILE.BAT", 0, False
rem ----------------------

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top