How to make batch files run in background
Mofi Anything related to running a batch-file in the background would be promising. That start will open a new cmd windows which will execute the batch file and after it started the process it will return to your cmd window from where you executed the command. Show 7 more comments. Active Oldest Votes. John Doe John Doe 5 5 silver badges 25 25 bronze badges. Add a comment. For windows 10 write. Shell" WshShell. Community Bot 1 1 1 silver badge.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. The batch file monitors the task list for a given program, and when it sees that it's shut down, prompts the user to de-licence it.
I'm currently trying to do this without converting the batch file into either an executable or Windows service file. Can anyone suggest either what's going wrong, or even better; a nice simple way for me to get the batch file to run ion start up I cannot use a GUI as I have to roll this out to several computers remotely.
You could make a shortcut to your batch file and place the shortcut in your Startup Programs directory :. Since you have to roll this out to several computers remotely, you should be able to copy the batch file to the startup programs directory over the network assuming the remote machines have WinRM enabled and your account has adequate permissions. If you want this batch file to run in the background at start up, you could reference your batch file from a VBScript instead of using the batch file's short cut and set the VBscript to run in invisible mode :.
If the program you are concerned about is a GUI program ie non console just wait for it to exit. Batch waits for GUI programs to exit but not when started interactively. Also Start is usually the wrong command to be using.
It starts programs in abnormal ways. This should use less battery power and CPU cycles. Batch files are read line by line so make VERY poor background tasks. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Run batch file in background Ask Question. Asked 3 years, 11 months ago. Active 3 years, 11 months ago.
Viewed 16k times. Can anyone suggest either what's going wrong, or even better; a nice simple way for me to get the batch file to run ion start up I cannot use a GUI as I have to roll this out to several computers remotely Thanks. Improve this question. There's no Windows — phuclv. Possible duplicate of Execute Batch File without Command line visible — phuclv. Add a comment. Active Oldest Votes. Shell" WshShell. Improve this answer. Adam Adam 1 1 silver badge 5 5 bronze badges.
0コメント