Jump to content

Recommended Posts

Posted

Hey guys, im having a really hard time getting my UI to automatically go past the first required login, ive tried autologon, autoadminlogon, autologoncount, searched the site numerous times and havent found anyone with my same scenario so hopefully its an easy fix. Anyone have any ideas?? Here my .sif.

[Data]

MsDosInitiated = 0

AutoPartition = 1

UnattendedInstall = Yes

[unattended]

UnattendMode = FullUnattended

UnattendSwitch = Yes

OemPreinstall = Yes

OemSkipEula = Yes

FileSystem = *

Repartition = Yes

WaitForReboot = No

TargetPath = "\Windows"

DriverSigningPolicy = Ignore

NonDriverSigningPolicy = Ignore

Hibernation = No

[GuiUnattended]

EncryptedAdminPassword = No

AdminPassword = "xxxxx"

AutoLogon = Yes

TimeZone = 35

OEMSkipRegional = 1

OemSkipWelcome = 1

[shell]

DefaultThemesOff = Yes

DefaultStartPanelOff = Yes

[userData]

ProductKey = "xxxxxx"

FullName = "Admin"

OrgName = "xxxxx"

[RegionalSettings]

Language = 1009

[GuiRunOnce]

%systemdrive%\install\appinstl.cmd


Posted

AutoLogon = Yes

This line tells Setup that the built-in Administrator account should be automatically logged on once, at first boot. You should remove it if you are going to assign any account other than the built-in Administrator account to be the one that logs on automatically. It may be advisable to remove it even if you are using the Admin account and the registry keys shown below, I'm not sure. Alternately you could import the autologon keys after the Administrator account has logged on at first boot and avoid any conflict that may be caused by giving Windows two seperate autologon instructions. The only downside to this is that all of you programs installed via appinstl.cmd will be installed by the Administrator account rather than your personal account.

This is the pair of files I use to assign autologon to my personal account:

useraccounts.cmd

net user User password /add
net localgroup Administrators User /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT

autologon.reg

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="User"
"DefaultPassword"="password"
"AutoAdminLogon"="1"

Both files are placed directly in the $OEM$ folder. I call useraccount.cmd from cmdlines.txt, and it, in turn, imports the keys in autologon.reg. "User" and "password" are variables that can be set as needed. (I don't, for example, really call my personal account "User." ;))

If you are looking to have XP's built-in Administrator account be the account that is automatically logged in, you should be able to skip every line in the batch file except the regedit one. Then enter the folowing in autologon.reg:

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Administrator"
"DefaultPassword"="<Admin Password from WINNT.SIF>"
"AutoAdminLogon"="1"

I hope this fixes things up for you.

Good luck. :D

Posted

thx guys, I can see where I will use this information for my home pc, but im making a UI for a ton of puters, so i only want it to autologon once so it will pass right by the initial logon and run the guirunonce automatically. After thats done I dont want it to login automatically with any account, just want the prompt. Do I have to use a reg tweak to achieve this??

Posted

Sorry punker, I've gotten a bit confused as to what exactly it is you want to accomplish. From what I understand, you want Setup to flow something like this:

  • Text mode setup (uA)
  • Reboot
  • GUI mode setup (uA)
  • Administrator account autologon
  • Appinstl.cmd executed (uA application setup)
  • Reboot
  • Login Prompt (No more autologons)

Have I got that right?

Posted

If you use this tweak to autologon:

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUsername"="Username"
"DefaultPassword"="Password"
"AutoAdminLogon"="1"

Use this tweak to remove the autologon:

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUsername"=-
"DefaultPassword"=-
"AutoAdminLogon"=-

Posted

You got it Cartoonite, thats exactly the flow I want to happen. But where it should do the 'Administrator account autologon', it gives me the login prompt. I would like to do it without reg tweaks if possible just because it would be the only thing i need reg tweaked.

Posted
After thats done I dont want it to login automatically with any account, just want the prompt. Do I have to use a reg tweak to achieve this??

[GuiUnattended]
AdminPassword=XXXX
Autologon=Yes
AutoLogonCount=1

Use these entries in Winnt.sif. Replace XXXX with your password.

No regtweak required, as you do not want autologon for a personal account.

Posted

Has anyone had any luck doing this if you use an encrypted admin password? I used the deployment tools to create my initial WINNT.SIF, and then further modified it to include things like OemPnPDriversPath, etc. But the problem I am having is that, although my password is created correctly, it gives me a message that it couldn't logon because the password is incorrect. Then I manually type in the username and password, and Voila!, I get in. I just don't want to risk the chance that someone will get this CD and find out a password. I guess the next thing I could do instead is create a simple password, no encryption, and then at the end of RunOnceEx use a VBS script to popup an InputBox that you can't cancel that changes the password. Any thoughts on this?

Posted

Whipped up a quick VBS script for you guys!

******

EDITED TO DISABLE AUTOLOGON IF "NO" IS CLICKED

******

Option Explicit

'  Set Registry path used for AutoLogon
Dim WinLogon
   WinLogon = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Dim Passwd
Dim AutoLogon


'  Do not allow user to not enter a new password.
'  I use this so that I cannot really forget to
'  create a new, non-trivial password.  Although
'  technically this isn't "unattended", I feel
'  it's a worthwhile compromise.  Consider
'  putting it at the end of RunOnceEx so it's
'  practically done with everything if you walk
'  away after getting Setup started.
Do While Passwd = ""
   Passwd = InputBox("Enter a new Administrator Password", "Update Password")
Loop


'  Message Box with Yes and No buttons
'  Yes = 6
'  No  = 7
AutoLogon = MsgBox("Do you want to enable Administrator AutoLogon?", VBYesNo, "Set AutoLogon")


Dim WshShell
   set WshShell = WScript.CreateObject("Wscript.Shell")
Dim objEnv
   set objEnv = WshShell.Environment("Process")
Dim Systemroot
   Systemroot = objEnv("SYSTEMROOT")


'  Use net command to change the administrator password
WshShell.Run Systemroot + "\system32\net.exe user administrator " + Passwd


'  If user says yes to above Message Box, then make
'  registry modifications
If AutoLogon = 6 Then
   WshShell.RegWrite WinLogon + "\DefaultUsername", "Administrator"
   WshShell.RegWrite WinLogon + "\DefaultPassword", Passwd
   WshShell.RegWrite WinLogon + "\AutoAdminLogon", "1"
Else
   WshShell.RegDelete WinLogon + "\DefaultUsername"
   WshShell.RegDelete WinLogon + "\DefaultPassword"
   WshShell.RegWrite WinLogon + "\AutoAdminLogon", "0"
End If    

Let me know what you think...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...