Sign in to follow this  
Followers 0
christopherc

Unattended Install in Windows 2003 with being logged in

3 posts in this topic

Hi,

Must say I love AutoIT and have been using it for about a month and the newsgroups have been great in helping me find the answers and learn.

We ran into the "wall" of running an unattended install on a system without being logged in and tried all the tricks (run as service etc.) posted to get it to work without sucess. However I discovered a way with VMWare ESX Server 3 to make it work that may help some people in the same boat.

We remotely restore the server's VM snapshot to a clean OS state that contains a script to pull a build down late at night and run the AutoIT executable to install the build. So far only I have only tried with Windows 2003 but should be the same with XP.

The trick is the when creating the VM snapshot you must:

1. Have a remote desktop session open to the server from another machine logged in as the user you are running as.

2. Create the snapshat and check the option 'Snapshot the virtual machine's memory'.

This 'holds' the remote session as open and has the user logged (you see two winlogin processes) in when the snapshot is restored. The AutoIT script simply runs the executable, sets the window (and all subsequent) to transparent and my installer runs without being logged in.

My script is set like this:

Dim $ProcessID, $title

$ProcessID = Run("C:\buildInstaller\setup.exe")

If WinWait("Manager Setup -", "Welcome to Setup") Then

$title = WinGetTitle("Manager Setup", "")

; Set the transparency and Click Next

WinSetTrans($title, "Welcome to Manager Setup", 0)

EndIf

ControlClick ($title, "", 1)

; etc

If anyoone has some other ideas, I would be glad to hear them!

Share this post


Link to post
Share on other sites



Well, there is a regkey for automatic user login at startup. At least in WinXP.

There is a gui version of that as well. Type in Start->Run: "control userpasswords2" (without quotes)

Then just set the autoit script in the startup folder of the start menu and make a self-destruct (read: delete) batch file if needed.

With this you can just shut the VM down. Use snapshot. Start machine up, and it logs automatically in and runs programs from startup folder.

Is this some idea you wanted to hear?


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

Well, there is a regkey for automatic user login at startup. At least in WinXP.

There is a gui version of that as well. Type in Start->Run: "control userpasswords2" (without quotes)

Then just set the autoit script in the startup folder of the start menu and make a self-destruct (read: delete) batch file if needed.

With this you can just shut the VM down. Use snapshot. Start machine up, and it logs automatically in and runs programs from startup folder.

Is this some idea you wanted to hear?

This I appreciate and will give it a try next in 2003. You start a task that seems so simple...

Share this post


Link to post
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
Sign in to follow this  
Followers 0