How to you perform a silent gui installation, whilst server is logged off

automated-installgraphical-user-interfacesilentwindows-server-2003

I create silent software installation packages for customers. This is pretty straight forward if the installation is a simple file dump, or add service and start; but a lot more difficult if customer instructions (and payload media), are gui based – 'run setup.exe, click next, enter text…'etc…

So I have been investigating the use of the autoit utility, which enables the installation to proceed as a gui (i.e. exactly as instructed by customer installation instructions), but with all actions performed automatically. However, as far as I can tell, in order to run the gui autoit script, someone with appropriate permissions needs to be logged on to the server.

I need a method to enable the gui script above to run, without any user actually being logged onto the server – similar to the script running as a service. Developing the installation package, delivering the media and installation scripts, then making the call isn't an issue. Getting the script to run through to completion without a user logging onto the server and starting the whole thing off, is.

To more closely look at the issue, I created a simple script to open notepad, enter some text, then save and close…

I have tried: running the script as a service which can 'interact with desktop' – notepad is displayed, but no keystrokes can be sent and the script hangs.

I am investigating to see if it is possible to raise a vncserver session, then export display (similar to unix varients), when I came across this excellent site…

Does anyone know of a method where interactive gui scripts may be raised on a server (e.g. win 2003), where no users are currently logged on at the time?

Thanks

Best Answer

Just an idea, but maybe a batch script in a scheduled task to automagically login as a maintenance user to run the install?

  • Write the login credentials to the Registry (see KB315231)
  • Add another script to Startup to clear out the credentials and launch the AutoIt enhanced install
  • Reboot
  • Profit!

It's crazy enough that it just might work.

Related Topic