Jump to content

Recommended Posts

Posted (edited)

Hi

I have an unattended XP setup which works well I have used the RunOnceEx.cmd method to install apps and fixes

I have created 2 users, 1 admin, 1 user, with UserAccounts.cmd

net user mfatadmin password /add

net localgroup Administrators mfatadmin /add

net user mfatuser password /add

net localgroup Users mfatuser /add

net accounts /maxpwage:unlimited

REGEDIT /S AutoLogon.reg

EXIT

This works and in AutoLogon.reg I have set the Admin account to be the default user so that RunOnceEx.cmd works properly

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"DefaultUserName"="mfatadmin"

"DefaultPassword"="password"

"AutoAdminLogon"="1"

After RunOnceEx.cmd has finished I want the default windows login to be the User account so I have created the (in RunOnceEx.cmd) entry at the end (before a reboot).

REG ADD %KEY%\055 /VE /D "Setting default user" /f

REG ADD %KEY%\055 /V 1 /D "%cdrom%\apps\install\SetUser.bat" /f

SetUser.bat contains

regedit /s AutoLogonUser.reg

and AutoLogonUser.reg contains

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"DefaultUserName"="mfatuser"

"DefaultPassword"="mfatuser"

"AutoAdminLogon"="1"

Now Setuser.bat works if I run it by itself but it doesn't work in the RunOnceEx.cmd script

How do I fix this or is there another way to go about what I require?

To recap I want 2 accounts an Admin and a User, the Admin is set as the default account 1st with an auto logon so that Windows and RunOnceEx.cmd installs correctly. I then want the User to be set as the default account with an auto logon. I want this to work all unattended

Edited by PeteM

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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