Although there seem to be many methods for creating users during an unattended setup I was looking for some tool that would allow the possibility to interact with the user creation process during an unattended installation, especially after burning my source on a CD/DVD. The oobe method doesn't provide this option neither does a registry hack via some batch.
Hence this little tool was created (see attached).
How it works:
Place the exe in the same folder with an INI file that you will create and should look like this:
[Interface] CheckValues=0 CancelButton=1 Confirm=1 PasswordCheck=1 MACAddressOveridesSections=1 ParseUserSection=1 ParseComputerSection=1 ParseSecuritySection=1 CheckIfUserExists=1 EnableTimeOut=1 TimeOut=120000 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-90-56-C0-DD-00 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_n] MAC=00-44-45-AB-D0-08 CompName=DeployedPCB CompWorkGroup=HomeNetB CompDesc=Unattended Windows XP (B) RegOwner=John Doe RegOrg=Yet Another 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 NewAdminName=root NewGuestName=NewGuest DisableAdmin=1 ForcedLogon=0 HideNewAdmin=1The [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
(new!) 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
Additionally, the program looks for n [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:
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 attempt 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 guest account this field holds the new name
DisableAdmin if set to 1 then the administrator (or the renamed administrator) account will be disabled
ForcedLogon if set to 1 will cause windows to automatically login the default user upon logoff
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
As of v1.0 setting any of the ParseSection parameters to 0 will result in inactivating the relevant section on the GUI. For example ParseUserSection=0 and ParseComputerSection=0 will look like this:
Call the exe from a script so that the new user will be created. I am running it from cmdlines using the following batch file:
@ECHO OFF CMDOW @ /HID TITLE Creating Windows XP Users %SystemDrive% CD %SystemRoot%Scriptsusers START /WAIT %SystemRoot%ScriptsCreateUser.exe
In the above example both files (the EXE and the INI) are in $OEM$$Scripts inside my unattended CD/DVD. The INI contains my default information for the account to be created with a non-secure password (123 or something) which will be used only for the unattended setup and should be changed after that ...
In order to read the necessary values from another ini file the tool can be started using:
CreateUser.exe /INI="<full path to INI file><inifile.ini>"Once the program is executed it will wait for the TimeOut period and then it will parse all the enabled sections UNLESS you click on the GUI, which allows for changes of all the information needed for the process.
Finally I should mention that it is working in my hands in Windows XP but I would consider it as a beta and would appreciate any feedback
- Added Dutch GUI Support
- Fixed French GUI
Update Pack Addon (compatible with nLite/Integrator, compiled and maintained by Aserone) Thanks Aserone
- Turkish (by KenanBalamir)
- French (by kSaMi and Ponch)
- Spanish (by iperoni)
- Russian (by Ulrih)
- Dutch (by pietpuk)
It would also be very helpful if people could provide the ANSI page code of the file with their strings. You can find a list of those codes here
Download language strings: Lang_Strings.7z 2.85KB 186 downloads(Only if you wish to translate the GUI to your language and contribute to this thread!)
- Add support for CryptProtectData functionality
- Add multi-lingual interface/messages
Edited by cancerface, 30 November 2008 - 02:11 PM.