Run a *.bat file as a service
Here are the steps to run a batch file automatically on a computer everytime it boots without displaying the console window:
- Open two empty notepad files and rename them as *.bat and *.vbs
where * stands for user-defined file names.
- Edit the *.bat file and copy the following line into it:
wscript.exe “C:\~path of the folder in which batch file to be run is present~\*.vbs” “~name of the batch file to be run~.bat”
- Edit the *.vbs file and copy the following line into it:
CreateObject(”Wscript.Shell”).Run “”"” & WScript.Arguments(0) & “”"”, 0, False
- Create a short-cut icon to *.bat file and copy it into the startup folder.
Its done.
Note: The two files that we create must be placed in the same folder in which the original batch file that we needed to run is present.
Leave a Reply
397 views, 2 so far
today |

