Feb 222016
 

When making an image with Thinstate from HP there was a problem with deploying the image.
Deploying the image has three fases:

  1. First boot; processing unattend.xml
  2. Second boot; Autologon with the user TEMPACCOUNT and processing HP scripts.
  3. Third boot; thin client ready, logon to user USER

When deploying the image, the TEMPACCOUNT does not logon automatically at the second boot.

Screen 20-jan 0002

You can use the password “tempaccount” to logon and the proces will continue.

Probably the problem occurs if you use sysprep multiple times, I`m not sure yet. I saw the password of the user TEMPACCOUNT in the unattended.xml changed by sysprep to “*SENSITIVE*DATA*DELETED*”.

Maybe this is the cause? Anyway I added the auto logon user to the image by mounting it with DISM and add the TEMPACCOUNT user auto logon by hand. This solves the problem at least:

  1. Mount the IBR file to disk:
    DISM.exe /Mount-Wim /WimFile:"%WIM%" /index:1 /MountDir:%MNTDIR%
  2. Load the registry hive
    REG.exe load HKLM\MSoftware %MNTDIR%\Windows\system32\config\software
  3. Add Autologon user
    REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "tempaccount" /f
    REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "tempaccount" /f
    REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "1" /f
  1. Unmount registry
    REG.exe unload HKLM\MSoftware
  2. unmount image
    DISM.exe /Unmount-Wim /MountDir:%MNTDIR% /commit

Compleet batchfile, place in IBR folder. Run as Administrator

@echo off
mode con: cols=75 lines=30 & Fix Tempaccount & Color 1A
:: Change the MNTDIR Var.
Set THISDIR=%~dp0
Set MNTDIR=d:\mntpTempAcc
Set WIM=%THISDIR%\FLASH.IBR
mkdir %MNTDIR%
DISM.exe /Mount-Wim /WimFile:"%WIM%" /index:1 /MountDir:%MNTDIR%
REG.exe load HKLM\MSoftware "%MNTDIR%\Windows\system32\config\software"
REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "tempaccount" /f
REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "tempaccount" /f
REG.exe add "HKLM\MSoftware\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "1" /f
REG.exe unload HKLM\MSoftware
DISM.exe /Unmount-Wim /MountDir:%MNTDIR% /commit
RD %MNTDIR%
Pause
EXIT

 

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)