Jump to content

Adding users during unattended setup


Recommended Posts

Hey guys,

I'm attempting to set it up so that I will have a user account created when the setup completes. I am following the method posted here: http://unattended.msfn.org/unattended.xp/v...web/27/#netuser.

I believe I have everything setup correctly. Initially I had the administrator password input into the WINNT.SIF file. I attempted to remove it, thinking that the user information I have will take precedence, however it didn't work out that way. In order for me to be able to use the net user method, what has to be input into the WINNT.SIF file?

Here is my existing file:

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No
TargetPath=\WINDOWS
Repartition="Yes"
WaitForReboot="No"
UnattendSwitch="yes"


[GuiUnattended]
AdminPassword=encrypted
EncryptedAdminPassword=Yes
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1

[UserData]
ProductKey=HIDDE-NFORS-ECURI-TYPUR-POSES
FullName="Work User"
OrgName="Organization"
ComputerName=*

[Display]
Xresolution=1024
YResolution=768

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

[Components]
msmsgs=off
zonegames=off

Does my WinNT.sif file need to be changed, to use the net user method?

Also, here is what I have in the useraccounts.cmd file:

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

You'll note I don't have a password in there. Is that possible, to have an account created using this method without a password, and is that correct? Or should I have a * after the username so it goes in as blank?

Thanks!

Link to comment
Share on other sites


I don;t know exactly whqat problem your having.

But your adduser.cmd looks ok to me. And I

don't see anything wrong with your winnt.sif.

But anything in the winnt.sif wouldn't effect

the net user add methed.

Whats in your autologon.reg file.

I don't use autologon.reg. Here is a copy

of my adduser.cmd that adds a user and sets qutologon

@CMDOW.EXE @ /HID
title Addusers
NET USER jim /ADD
NET LOCALGROUP Administrators jim /ADD

NET ACCOUNTS /MAXPWAGE:unlimited

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "jim" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "1" /f

exit

Link to comment
Share on other sites

Also, here is what I have in the useraccounts.cmd file:

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

You'll note I don't have a password in there. Is that possible, to have an account created using this method without a password, and is that correct? Or should I have a * after the username so it goes in as blank?

Yes, there should be a * there. You can easily test this yourself. Replace your name for something else and simply run it on an already installed test machine. If it doesn't work, it won't work during your unattended installation process either.

Link to comment
Share on other sites

Ok, I discovered that while I thought I had the entry into cmdlines.txt file, but I didn't. When I replaced it, it seems to be processing the entries now. One problem I have though is I have a * for the password so it would leave it blank. All it does now is during the setup, it tells me that it's creating the user account Dan, and for me to enter a password. I can hit enter twice and leave it blank, but that's not really unattended now is it? ;)

Any ideas?

Link to comment
Share on other sites

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...