Jump to content

AutoIT script running through a reboot


Recommended Posts

Hello All,

OK so here is my query:

I am automating a build and of course we all come to that point where you've scripted the automated part and now you have to reboot.

For example; Joining a computer to a domain!!!

Well once you do this you have to reboot to make this change effective.

So there in lies my question - I still have several more scripts I would like to run and I don't want to have to logon again to do them!

CALL ME LAZY!   - PFFFF

So my thought is prior to the reboot I could copy the next autoit-script.exe into the startup folder and of course I have to then change the logon function to auto login to the newly created domain with the appropriate domain ID with it's appropriate credentials.

I haven't quite figured all of this out yet but figured I would put a post out there and see what types of responses I would get.

 

Thoughts eveyone?

PS - Also interested to know if anyone has a script that disables the keyboard and mouse while a script is running?

Edited by MovieScreener2013
Link to comment
Share on other sites

  • Moderators

I did one like this a number of years back, it was all in one script that used command line parameters (look in the help file). For example, if command line param was zero it would begin the "pre-reboot" tasks; if it was 1, the "post-reboot" tasks. You can create the registry entry (Run or RunOnce, depending on your needs) for the startup with the associated parameter(s).

As for disabling input, look at BlockInput in the help file - but use it sparingly.

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I also use the RunOnce key plus a self created "flag" key in HKLM\Software to tell me what state of my run I'm in, and I automate (or remove) automatic logon using Autologon.exe from SysInternals (some things might require a user-profile to be existing, if you create a user some items are not populated in registry for that user until profile is created during login).

The flag key helps when you have to add software or use DISM to add a feature to Windows and a reboot is required so that another tool that requires the software or feature can run. It's an alternative to the command-line method JLogan3o13 posted.

Always carry a towel.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...