Partager via


Automated Runs on Start Up

Note: this is for a non domain joined computer. 

This is the scenario that I want.  Once windows boot up, it logs onto a specific account automatically and then runs a program automatically.  Once that finishes, the operating system shuts down.

First step is to run "control userpasswords2" on xp or "netplwiz" on vista.  Do this via start->run or the windows+R key combo.  This app allows you to set up auto logon with a specific user.  When the top checkbox is checked, select a user, and then uncheck that checkbox.  Now enter the password and click ok.  Now, when the computer boots up, it will always automatically log on to the selected user.

To run a program on logon, there are actually a couple of options.  The easiest one is to just add a shortcut/batch file into the startup folder inside the start menu.  You can see a list of locations by running the autorun program from sysinternals at https://technet.microsoft.com/en-us/sysinternals/default.aspx.

To shut down the os once the designated program is done running, we want to have a batch file inside the startup folder.  That batch file will start the designated program and shutdown the os.  We can perform the shutdown portion by running the shutdown command.  For a full list of options, simply run "shutdown /?" inside the commandline.