Reputation: 838
on start up i have a bat file run routine things for me
however, the black console pops up and stays open until everything is finished....
anyway to hide it and run it in background ? so it shouldn't appear minimized or system tray.
Upvotes: 5
Views: 24287
Reputation: 95518
Try renaming your file to .cmd
instead of .bat
.
Or, if you're executing a .exe
try:
start "" "C:\Program Files\SomeProg\someprog.exe"
Note: When using "start" you have to be at a command prompt.
Upvotes: 0
Reputation: 5783
This link should help you as helped me. I used the second solution that uses a program named quiet.exe
To use, just call quiet.exe program params_if_has
.
My use example: quiet.exe php script.php
Upvotes: 2
Reputation: 51
You can use a VBS script to achieve this. Either write all your code as VBS, or call your batch file like this:
'launch.vbs
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "mybatch.bat", 0
WshShell = Null
Upvotes: 5
Reputation: 354506
I once had a little program which could hide windows based on their title. So my startup batch first set a unique title with title
and then called the other program to hide the window with said title. Worked fine but involves a little programming.
If you don't want to go that way, then you should use the Task Scheduler as tr4656 noted.
Upvotes: 0
Reputation: 10033
Create a shortcut to the file. On the new shortcut: Right click -> Properties. Go to the Shortcut tab, and choose "Run: Minimized." (This is assuming you're on WinXP).
Upvotes: 2
Reputation: 1298
You can't really do that but if you are using the scheduler to run the batch file you can select "don't interact with desktop" when creating the job.
Upvotes: 0