12
4
After deploying a Windows 7 image to Stand alone machines we run into the following problem.
If we set autologon to off then we have to log in manually and activate Windows and Office - the Keys are installed but the products are not activated. (These laptops are set as loan laptops so may not be used for months after they are imaged - grace period expired)
If we do set Autologon to on and run a script to activate the products on first logon - when they are network connected, then the machine will always log on to the account we have specified in the autologon.
I was wondering, is there a way to turn off autologon via a script?
It can be done manually by following the instructions in this post or via a registry key(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon)
I'm not sure how to manage this from the command line or a script if anyone could point me in the right direction it would be much appreicated.
Just execute it from a bat file? – Joe Taylor – 2011-09-30T10:10:40.147
Yes for the 2nd one, run as administrator. – harrymc – 2011-09-30T10:17:55.477
Calling a reg file from a bat file to run at first logon worked for me. – Joe Taylor – 2011-10-04T10:17:50.637
The data type for AutoAdminLogon should be REG_SZ and not REG_BINARY. – Irukandji – 2012-07-24T11:57:39.410
@baijiu: Well, I did warn that it was untested... Fixed now. – harrymc – 2012-07-24T13:16:03.213
Be sure to run the x64 reg.exe on x64 Windows. (
set proc
will displayPROCESSOR_ARCHITECTURE=x86
in a WoW64cmd.exe
. In that case you'll need to run%SystemRoot%\SysNative\reg.exe
.) – Kevin Smyth – 2014-03-25T20:35:51.907