Jump to content

Computer name/Add User problem


Recommended Posts

I am so close to completing my first unattended XP SP2 cd thanks to msfn however I still have two problems/errors that I can't seem to get by.

The first:

I have specified the computername in my winnt.sif file however it continues to set itself to "mobile-" and the a random string of number and letters. Here is a clip of my winnt.sif file:

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

[Unattended]
   AutoActivate=YES
   CrashDumpSetting=0
   DisableDynamicUpdates=Yes
   DriverSigningPolicy=Ignore
   FileSystem=NTFS
   UnattendMode=FullUnattended
   UnattendSwitch=Yes
   OemPreinstall=Yes
   OemSkipEula=Yes
   WaitForReboot=No
   TargetPath=\Windows
   NonDriverSigningPolicy=Ignore
   Hibernation=No
   Repartition=Yes

[GuiUnattended]
   AdminPassword="password"
   EncryptedAdminPassword=NO
   AutoLogon=Yes
   TimeZone=20
   OEMSkipRegional=1
   OemSkipWelcome=1
   ProfilesDir="C:\Documents and Settings\"
   AutoLogonCount=2

[UserData]
   ProductKey="Product Key"
   FullName="Scott Stein"
   OrgName="Mobile Gear"
   ComputerName=ComputerName

The second problem is during the user setup in my useraccounts.cmd I receive the following error message when it is run:

The user or group account specified cannot be found.

The user was successfully created but could not be added to the users local group.

NET HELPMSG 3774

Here is a clip of the useraccounts.cmd file, the error occurs at the net user /add line:

@echo off

net user username /add
net user username password
net localgroup Administrators username /add
net accounts /maxpwage:unlimited

ECHO.
Echo Processing autologon
REGEDIT /S autologon.reg
Echo Autologon completed successfully

echo.
pause

EXIT

Any help would be greatly appreaciated.

Thanks in advanced

-Scott

Link to comment
Share on other sites


are these exact copies of your files? it is is then it is not surprising that it does not work.

first in the winnt.sif change the ComputerName=ComputerName to

ComputerName=computer

here is a copy of my winnt.sif

[UserData]
   ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
   FullName="myself"
   OrgName=""
   ComputerName=computer

my useraccounts.cmd looks like this

cmdow @ /HID
@echo off

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

then the autologon.reg must look like this

Windows Registry Editor Version 5.00 

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

Link to comment
Share on other sites

I've gone back to the begining and tried the most basic UI without SP2 or additional installs. I only added the winnt.sif file and it still changes my computer name to "mobile-" then the randoms string of characters.

Here is the full winnt.sif file that was used.

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

[Unattended]
   UnattendMode=FullUnattended
   OemSkipEula=Yes
   OemPreinstall=No
   TargetPath=\WINDOWS

[GuiUnattended]
   AdminPassword="XXXXX"
   EncryptedAdminPassword=NO
   AutoLogon=Yes
   AutoLogonCount=5
   OEMSkipRegional=1
   TimeZone=20
   OemSkipWelcome=1

[UserData]
   ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
   FullName="Scott Stein"
   OrgName="Mobile Gear"
   ComputerName=scottspc

[TapiLocation]
   CountryCode=1
   Dialing=Tone
   AreaCode=952

[RegionalSettings]
   LanguageGroup=2,1

[Identification]
   JoinWorkgroup=scottshome

[Networking]
   InstallDefaultComponents=Yes

Link to comment
Share on other sites

This is mine and the first thing that comes to my mind is the OEMPreinstall. I am sure it should be set to YES

The second is the UnattendSwitxh="yes" it is not in your file.

might be worth copying mine and use it with changed user data. this one does work.

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

[Unattended]
   UnattendMode=FullUnattended
   OemSkipEula=Yes
   OemPreinstall=yes
   UnattendSwitch="yes"
   TargetPath=\WINDOWS
   FileSystem=*
   WaitForReboot="No"
   DriverSigningPolicy=Ignore
   OemPnPDriversPath="drivers\002GRAPHICS"

[GuiUnattended]
   AdminPassword="xxx"
   EncryptedAdminPassword=NO
   OEMSkipRegional=1
   TimeZone=105
   OemSkipWelcome=1

[UserData]
   ProductKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
   FullName="B. Bulldog"
   OrgName=""
   ComputerName=computer

[Display]
   BitsPerPel=32
   Xresolution=1024
   YResolution=768

[RegionalSettings]
   LanguageGroup=1

[Identification]
   JoinWorkgroup=wally

[Networking]
   InstallDefaultComponents=No

[NetAdapters]
   Adapter1=params.Adapter1

[params.Adapter1]
   INFID=*

[NetClients]
   MS_MSClient=params.MS_MSClient

[NetServices]
   MS_SERVER=params.MS_SERVER

[NetProtocols]
   MS_TCPIP=params.MS_TCPIP

[params.MS_TCPIP]
   DNS=Yes
   UseDomainNameDevolution=No
   EnableLMHosts=Yes
   AdapterSections=params.MS_TCPIP.Adapter1

[params.MS_TCPIP.Adapter1]
   SpecificTo=Adapter1
   DHCP=Yes
   WINS=No
   NetBIOSOptions=0

[Components]
   msmsgs=off
   msnexplr=off
   freecell=off
   hearts=off
   minesweeper=off
   pinball=off
   solitaire=off
   spider=off
   zonegames=off

[WindowsFirewall]
   Profiles = WindowsFirewall.TurnOffFirewall

[WindowsFirewall.TurnOffFirewall]
   Mode = 0

[GuiRunOnce]

Link to comment
Share on other sites

This is mine and the first thing that comes to my mind is the OEMPreinstall. I am sure it should be set to YES

The second is the UnattendSwitxh="yes" it is not in your file.

The OEMPreinstall only needs to be set to yes if you are using the $OEM$ to install other apps, tweaks, etc.

and the UnattendSwitch only needs to be set if you want to bypass the network setup adn regional options.

Which in both cases are not factors in doing a basic install test.

Thanks

Link to comment
Share on other sites

Unattend.txt

1. the TargetPath parameter doesn't accept "\"'s -- you should change it to "windows"

2. An easy way to get a look at how Setup will parse your unattend file is to run it under Winnt32 and see what gets spat out.

run Winnt32 /unattend:<pathto>:\winnt.sif /tempdrive:%systemdrive% /noreboot

then Notepad %systemdrive%\$win_nt$.~bt\winnt.sif

This copy of winnt.sif has been parsed by setup and you can see some changes... but the only one we really care about is the computername setting. What does it say it's set to here?

Another option: If you've already run this winnt.sif file through setup on a system that's still hanging around, take a look at

"%windir%\system32\$winnt$.inf"

Again, this is your unattend file after Setup gets through parsing it. If you dont' see a computername setting in this file then you'll have to backup and try the winnt32 option.

3. Why are you trying to set the %profilesdir% to the default setting? Just curious...

USERACCOUNTS.CMD

You don't make it clear -- are you running this file as a runonce item or from cmdlines.txt?

Either way: The easiest method of figuring this out is going to be by replacing your batch file call with:

"%windir%\system32\cmd.exe /k"

This will launch a cmd.exe window that waits for you to close it before moving on. Try running your batch file manually from this window and see what happens. Since it's erroring on some weird group-related errors, try running:

"net localgroup" to get a look at the valid groups that your system believes in and compare that to your script.

Hope that helps.

Link to comment
Share on other sites

Another idea for the computer name is since windows computer names are always in capitals... you may wanna change the Computername=COMPUTER instead of computer or whatever. I ran into a similar problem with the product key letters not being in caps. Just an idea.

Link to comment
Share on other sites

Unattend.txt

1. the TargetPath parameter doesn't accept "\"'s -- you should change it to "windows"

The target path actually does accept "\" and was no problem during the setup. I think I have found the solution to this problem elsewhere but have yet to test it.

USERACCOUNTS.CMD

You don't make it clear -- are you running this file as a runonce item or from cmdlines.txt?

It's not the execution of the useraccounts.cmd that is a problem it is one of the commands.

Either way:  The easiest method of figuring this out is going to be by replacing your batch file call with:

"%windir%\system32\cmd.exe /k"

1

This will launch a cmd.exe window that waits for you to close it before moving on.  Try running your batch file manually from this window and see what happens.  Since it's erroring on some weird group-related errors, try running:

"net localgroup" to get a look at the valid groups that your system believes in and compare that to your script.

Hope that helps.

I added a pause at the end of the cmd file which is how I got the output of the error during setup however I'm not able to find out what is causing the problem and what problems it could cause down the road.

Link to comment
Share on other sites

Or useraccounts cmd may be running at the wrong time during setup.

If I remember correctly it ran after the "registering components" portion of the install and before the "saving settings". I'm not sure it is possible to change when the cmdlines.txt runs being that windows calls it automatically.

Link to comment
Share on other sites

I run my user batch file under guirunonce so that I know all groups have been made that I've specified and so on.

That and I add domain accounts to the admin account so I have to run it at gui.

I'll try to think of more things.

Later

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