On WinXP, can I run a batch (.bat or .cmd) file, via a shortcut, without a "black window" ?
|
migrated from stackoverflow.com May 11 '10 at 18:32
|
Save the following as wscript, for instance, hidecmd.vbs after replacing "testing.bat" with your batch file's name.
The reference is here http://msdn.microsoft.com/en-us/library/d5fk67ky.aspx |
||||
|
|
|
This is just a simplification of Shaji's answer. You can run your batch script through a vbs script like this:
This will execute your batch file with no cmd window shown. |
|||
|
|
|
Use start with the '/B' option. For example:
|
|||||
|
|
Free GPL open source "Create Hidden Process" http://www.commandline.co.uk/chp/ Microsoft Security Essentials, and probably most other virus/malware scanners will treat the executable, chp.exe, as a virus because it hides whatever program you specify from displaying a window or a task bar button, just like viruses do. It's not a virus. It doesn't hide the target process from appearing in task manager for example. And of course the source code is included so you can see that it's very small and doesn't do anything but run whatever program you give it. You don't even have to trust that the included chp.exe really was built from that source. You can go ahead and discard the included chp.exe and compile your own from the source, and all the necessary tools to do so are even free and downloadable. You can also just make a shortcut to the .bat or .cmd file, then right-click on the shortcut, Properties, Shortcut tab, Run: Minimized. Then in scheduled tasks, use the shortcut instead of the .bat/.cmd file directly. That will prevent a window from popping up, but a taskbar button will still appear. |
||||
|
|
|
You can change the properties of the of the shortcut to run minimized. To run it completely invisibly you'll need something else like Windows Scripting. |
|||
|
|
|
Use Hidden Start
|
||||
|
|
