Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 Windows Instance not starting batch file from startup folder after restart

I am trying to configure an EC2 Windows 2008 server instance to automatically start a batch file after the instance is restarted (to connect to Jenkins). I have placed a shortcut to the batch file in the Startup folder in the Windows menu.

The problem I am seeing is that the instance does not start the batch file until I actually login to the instance with remote desktop. As soon as I log in to the instance, the file is executed.

How do I make sure that the batch file is started as soon as the operative system is loaded?

like image 837
djonsson Avatar asked Oct 20 '22 14:10

djonsson


1 Answers

I figured it out. The trick was to automatically log in after the instance is restarted:

  1. Open the Start Menu, type netplwiz in the search box, and press Enter.
  2. Untick Users must enter a user name and password to use this computer
  3. Enter the windows password in the confirmation dialogue

The instance will now run the items in the Startup folder in Windows.

If this is not configured on the instance, the login will actually happen when you remote desktop into the instance.

like image 164
djonsson Avatar answered Oct 27 '22 10:10

djonsson