3

Alright so I have been reading through the various answers on Super User for this question and no one has seemed to actually post a way of running a .bat file in Task Scheduler at PC startup. I would like to do this...

I tried having Task Scheduler start cmd.exe at PC startup with the arguments being the directory of the .bat file but it just does not work. Even if it says it does run the .bat the .bat's commands don't execute... How do I get it so it can run in Task Scheduler without this issue?

2 Answers2

1

I am using the "Startup" folder for bat files to be executed at the startup.

Copy your bat file in your "Startup" folder (for example C:\Users\*your username*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup).

Replace exit by pause at the end of the bat file (exit is not needed here anyway). This is for testing purposes. The command prompt will not close until you will press a key. It is good way to see if there were any errors during the executing the commands from the bat file.

Remove the pause command when you are happy with the result.

djhurio
  • 599
0

Simply point the Scheduler's task to the .bat file itself. That is - in the Actions tab have Start a program entry that leads straight to the .bat file - not cmd.exe with parameters.