I have installed a ruby gem called Redcar, which is launched from the command line. When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing command line work. The shell I'm using is the GITBash shell from MySysGit. I found a Redcar.bat file which is meant to launch Redcar as a shortcut, I presume, but I don't want the extra command prompt window to open whenever I launch the BAT file. How do I just run the BAT without seeing the prompt?
feedback
|
|
You can't -- executing a batch file with the built in Command Prompt is going to keep a window open until the batch file exits. What you can do is take steps to make sure that the batch file exits as quickly as possible. If at all possible, modify the batch file to run whatever program with the One caveat to this is that if you're running a console-mode program, which many script interpreters are, the batch file will wait for the program to exit, and using A final possibility is to use a 3rd-party tool to run the command prompt with a hidden window. I've heard of such things but never had a use for them, so I don't know of anything in particular to point you to. | |||
feedback
|
|
Give this a try:
| |||
feedback
|
|
I'm not clear as to your issue, but with some of my batch files, I use a "dumy" who's only purpose is to launch the main batch file. So GO.BAT will have:
The exit closes the command prompt window that would otherwise remain open. And GO2.BAT will have the actually batch file contents that I wish.
| ||||
|
feedback
|
|
If you are still interested in not showing the console window at all, here is solution from stackoverflow, that worked for me: http://stackoverflow.com/questions/289498/running-batch-file-in-background-when-windows-boots-up (in my case I didn't put anything in the registry, but where I needed). | |||
|
feedback
|