Batch File Not Running During System Startup

Hello All, as you know it very well that we create a batch file to run a set of commands in one shot. If you use batch file and run it directly ( by double clicking on it ) then it runs. But in this case it will work for a single user or machine. But what the case should be if you have multiple workstations to get it run. The answer is that it can be achieved with the help of GPO. Group Policy is a fantastic feature of Windows Active Directory through which we can implement it on a number of machines. But my friends told me that this batch file not running during system startup.

If batch file is not running while you have set it on system startup then configure this batch file to run on system shutdown. In both scenario (System startup or shutdown) you will get the same result. Also, got positive feedback from my friends who were struggling to run it on system startup. They configured it on system shutdown and fixed the issue. 

Execute Batch File Using Group Policy

Please follow the below steps to run batch file using Group Policy. 

first of all open Group Policy management console or follow this link to get the same How To Open Group Policy Management Console

Once it is opened then go to below path:

Computer Configuration–> Policies–> Windows Settings–> Scripts (Startup/Shutdown)

After that on right side simply double click on Shutdown option to open and configure it. Then click on button “Show Files” and place your Batch File over here (Copy & Paste). Now, close this window and click on “Add” button. It will ask you to browse that file. Click on “Browse” button and select that pasted file. Thereafter, click on “open” button to add that file. Now, click on “OK” button twice to come out of the window.

Now run “gpupdate /force” command to get this policy applied on machine. Verify whether policy applied or not by running “gpresult /r” command. Once applied the GPO then take a reboot and you will see that batch file ran and gave the desired output.

Thanks.

Other Posts:

3 thoughts on “Batch File Not Running During System Startup

Leave a Reply