Description:

A tool that facilitates the creation of a new user, renaming of the computer, joining of a workgroup, setting the registered user/organization in a (un)attended mode via a user frendly GUI.

Tested under Windows 2000,XP,2k3 (english versions)

MSFN thread: http://www.msfn.org/board/index.php?showtopic=70510



Piccies:

http://img110.imageshack.us/my.php?image=imagelongac8.jpg

http://img104.imageshack.us/my.php?image=imagelongsecxs6.jpg



Usage:

Place the exe in the same folder with its INI file (NewUser.ini) and run it!

The tool can be called from a batch at T12 (or at any other point of an unattended installation of windows). For example:



##############################



@ECHO OFF

CMDOW @ /HID

TITLE Creating Windows XP Users

%SystemDrive%

CD %SystemRoot%\Scripts\users

START /WAIT %SystemRoot%\Scripts\CreateUser.exe



##############################



Note that both the EXE and its INI should be at the same folder, IF an INI filename is not given at the command prompt.

In order to read the neccesary values from another ini file the tool can be started using:

CreateUser.exe /INI="<full path to INI file>\<inifile.ini>"



##############################



INI file structure and description:

The INI file has the following structure:



[Interface]

CheckValues=1

CancelButton=1

Confirm=0
PasswordCheck=1
MACAddressOveridesSections=1

ParseUserSection=1

ParseComputerSection=1

ParseSecuritySection=1

CheckIfUserExists=1

EnableTimeOut=0

TimeOut=60000

Beep=1
BeepWarning=1
BeepFreq=500
BeepDuration=100


[UserInfo]

FirstName=John

LastName=Doe

Description=System Administrator

UserName=jdoe

Password=123

UnlimitedPass=1

AutoLogon=1

Admin=1



[ComputerInfo]

CompName=DeployedPC

CompWorkGroup=HomeNet

CompDesc=Unattended Windows XP

RegOwner=John Doe

RegOrg=Some Company, Inc.



[ComputerInfo_1]

MAC=00-CC-A8-B0-44-0D

CompName=DeployedPCA

CompWorkGroup=HomeNetA

CompDesc=Unattended Windows XP (A)

RegOwner=John Doe

RegOrg=Some Company, Inc.
ParseSecuritySection=1
FirstName=Jack
LastName=Doe
Description=System Administrator (A)
UserName=jdoe
Password=567
UnlimitedPass=1
AutoLogon=1
Admin=1
FakeAdmin=1
FakeGuest=1
RenameAdmin=1
RenameGuest=1
DisableAdmin=1
ForcedLogon=1
NewAdminName=rootA
NewGuestName=NewGuestA
HideNewAdmin=1



[ComputerInfo_2]

MAC=02-88-F2-DD-EB-0D

CompName=DeployedPCB

CompWorkGroup=HomeNetB

CompDesc=Unattended Windows XP (B)

RegOwner=John Doe

RegOrg=Some Company, Inc.
ParseSecuritySection=0
FirstName=Jim
LastName=Doe
Description=System Administrator (B)
UserName=jimdoe
Password=567891
UnlimitedPass=1
AutoLogon=1
Admin=1
FakeAdmin=
FakeGuest=
RenameAdmin=
RenameGuest=
DisableAdmin=
ForcedLogon=
NewAdminName=
NewGuestName=
HideNewAdmin=



[SecurityInfo]

FakeAdmin=1

FakeGuest=1

RenameAdmin=1

RenameGuest=1

DisableAdmin=1

ForcedLogon=0

NewAdminName=root

NewGuestName=NewGuest

HideNewAdmin=1



##############################



The [Interface] Section contains entries that can be either 1 or 0.

CheckValues forces the program to check if the user has filled all fields.

CancelButton displays or hides the cancel button.

Confirm invokes a dialog asking if you really want to proceed with the user creation process (...)
PasswordCheck will disable password checking and will force an empty password
MACAddressOveridesSections will override all the [UserIfo] and [SecurityInfo] values and will force reading them directly from an appropriate [ComputerInfo_n] section

ParseUserSection if set to 0 the user-creation part will not get processed

ParseComputerSection if set to 0 the computer-renaming part will not get processed

ParseSecuritySection if set to 0 the security section will not be processed

CheckIfUserExists if set to 1 will force a check for the username in the local user database

EnableTimeOut if set to 0 will disable the timeout and the next parameter (TimeOut) will be ignored

TimeOut is the time that you want the program to wait before adding the user. Note that this value is in milliseconds.

Beep if set to 1 it enables a sound from the PC speaker when the progress bar is changing
BeepWarning if set to 1 will only allow the sound when the bar is at 50% or less of the TimeOut value
BeepFreq sets the frequency of the sound (50 - 5000)
BeepDuration sets the duration in ms of the sound (50 - 1000)


The first five values of the [UserInfo] section are self explanatory.

Admin can be either 1 or 0. In the first case the created user will be added to the admin group. If the value is 0 then the user will be added to the users group.

UnlimitedPass can be either 1 or 0. In the first case the password will be set not to expire.

AutoLogon can also be 1 or 0. If it is set to 1 then the user will be automatically logged to the system.



The [ComputerInfo] section controls five parameters:

CompName and CompDesc and can be used to setup the computer's name and description

CompWorkGroup is used to set the name of the workgroup for the PC and join it.

RegOwner is used to set the registered owner of the local PC

RegOrg is used to set the registered organization of the local PC



The program looks for [ComputerInfo_n] sections which contain similar information to the [ComputerInfo] section but they are tied to specific MAC addresses.

A [ComputerInfo_n] section contains, in addition to the above, a parameter called MAC which is used to identify the physical address of a network controller. If upon execution the MAC address of an ethernet

controller matches the value of the MAC parameter in a [ComputerInfo_n] section then all the computer parameters (Name, Workgroup etc) will be read from that section.


As of v.1.8 if the MACAddressOveridesSections flag is active in the [Interface] section then the following values can also be parsed from the [ComputerInfo_n] section that contains a matching MAC address:
ParseSecuritySection
FirstName
LastName
Description
UserName
Password
UnlimitedPass
AutoLogon
Admin
FakeAdmin
FakeGuest
RenameAdmin
RenameGuest
DisableAdmin
ForcedLogon
NewAdminName
NewGuestName
HideNewAdmin
These values will now override the ones in [UserInfo] and [SecurityInfo] sections

If however there is no match of the MAC values from each section to the MAC address of an ethernet controller on the target PC then the values from the initial [ComputerInfo] [UserInfo] and [SecurityInfo] section will be used instead.


The [SecurityInfo] section controls the following parameters:

FakeAdmin if set to 1 the tool will create an account called 'Administrator' (or whatever the name in your localized version of windows) which will be set with a loooong MD5 password and will be locked and inactive.

FakeGuest if set to 1 the tool will generate a Fake Guest account similar to the Administrator account described above

RenameAdmin if set to 1 the tool will atempt to rename the default Administrator account

RenameGuest same as above, if set to 1 the tool will rename the Guest account

NewAdminName if you chose to rename the administrator account this field holds the new name

NewGuestName if you chose to rename the guestaccount this field holds the new name

DisableAdmin if set to 1 will disable the original (or renamed) administrator account

ForcedLogon if set to 1 will force an automated user login every time a user logs off

HideNewAdmin [Windows XP] if set to 1 this will hide the renamed administrator account from the list of users that can log on the PC



##############################

