1

I have used System Image Manager to create an unattended XML answer file, which I have written to a Windows 7 DVD. This contains almost all system configuration, but deliberately does not include username or password for the installed system - I want the user to enter these, at the console, during setup.

However, I then run some post-install scripts, some of which reboot the machine and continue after the reboot. This means the user has to log in multiple times during the installation - and since some scripts take a while to run, this is quite inconvenient. Because of this, I'm looking for a way to enable auto-login after the install.

However, all the examples I can find only support using a username/password which is set in the answer file, not supplied by the user. Am I missing something obvious, or can anyone think of any clever workaround for this?

I have tried adding a FirstLogonCommand to the oobeSystem pass, which uses %USERNAME% and %USERPASSWORD% to enable autologin via Sysinternals "Autologon" utility, but found that %USERPASSWORD% was not expanded. Is there a way of finding this information?

The only other workaround I can think of is to run my post-install scripts before any user logs in, probably by creating a service. This would increase complexity though - I'd much rather have them running interactively and visibly in a user session.

(Edit: Perhaps it's relevant to mention that I am not using an AD domain here either).

1 Answer 1

0

I would recommend using MDT (Microsoft Deployment Toolkit) to handle this automatically.

It has a user account page for user defined account(s). It will place the created user(s) into a var(s). You can run a command (from cmd or powershell) using that var. Or if you're really into unattend.xml you can have it integrated into the unattend.xml file when it is generated for the target system.

I personally recommend the command line way because it is easier to keep track of and manage without having to load up the image editor that comes with the WAIK.

7
  • If you need me to build that batch file for you give me a heads up. I would also edit the answer so it contains the same batch file. May 15, 2015 at 13:12
  • Hm, thanks, but the unattend.xml file doesn't contain the username/password - they are provided by the user during the install. Unless you mean there's another file that the installer writes as it runs?
    – randomdude
    May 15, 2015 at 17:14
  • Do you know about the unattended.XML auto login section? May 15, 2015 at 17:16
  • I do - I couldn't get it to auto-login without providing a password, though, and it wouldn't expand %USERNAME% or password fields (I ended up with a login prompt for, literally, "%USERNAME%").
    – randomdude
    May 15, 2015 at 17:20
  • Ok, then have you heard of MDT, Microsoft Deployment Toolkit (it is free)? May 15, 2015 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .