Execute batch file no window




















But I tried to do something similar when coding ror. I wanted to run "rails server" in a new cmd window so I don't have to open a new cmd and then find my path again. This will then execute "pause" but close the window when the command is done. In this case after you pressed a button.

I found this useful for "rails server", then when I shutdown my dev server I don't have to close the window after. The proper formatting of the command string becomes more complicated when using arguments with spaces. See the examples below.

Note the nested double quotes in some examples. The above answers helped me. But still required some figuring out. Here is an example script I use to start 3 processes for web development. It results in 3 windows staying open, as they need to run continously. Mongo is globally added to my path, so I don't need to cd like I do for the other two programs. Of course the path to your files will vary, but hopefully this will help.

The best approach is to have the part of your script that you want to be executed in a "new window" to be in a separate. This might be impractical if e. One option is to pass any values you need e. If you have a large amount of state to transmit you might consider generating a batch file at runtime:. Thanks to all here in Stack Overflow; this solution solves the above question but is extended to automatically run these tasks:. Any useful feedback you have about the tool is welcome.

Download Silent Batch Launcher. Note: Because this tool was created with Autoit, it does create some false positives with online virus scanners like VirusTotal. Hiding the batch script console window using Visual Basic is quite similar to using an external command and works in basically the same way. Launch the VB script and supply the batch file as an argument, then the code runs the script while not showing any output. It can be done with a single line of code.

Create an empty text file, copy and paste the above line then save it as a. Alternatively, download launchquiet. To add it to a shortcut or a startup location etc, use the commands in the following way.

If you would like to supply an argument for the batch file, the piece of VB script has to be altered slightly by changing the two sets of four double quotes to two sets of two.

That SilentCMD app is a gem. In just 14kb. You missed a tool that has been around for 16 years. It saved me a 2 minutes popup every 10 minutes :. Charles Nelson 8 months ago. Novabin 1 year ago. Alex Gorky 1 year ago. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Linked Related Hot Network Questions. Question feed. Check out the full discussion thread here. Use Google Fonts in Word. Customize the Taskbar in Windows What Is svchost. Best Home Theater Systems. Best Smartwatches. Best Gaming Laptops. Best Smart Displays. Best Home Security Systems. Best External Solid State Drives. Best Portable Chargers. Best Phone Chargers. Best Wi-Fi Range Extenders.

Best Oculus Quest 2 Accessories. Awesome PC Accessories. Best Linux Laptops. Best Wireless iPhone Earbuds. Best Bluetooth Trackers.



0コメント

  • 1000 / 1000