Easy-to-use, Comprehensive and Affordable Systems Management
With the K1000 it absolutely replaced the need for me to hire an entry level person. So right off the bat we're looking at 56% reduction in employee costs just in the IT department.
Chris Myers, IT Director
Locks Law Firm

How to rename a computer and join it to a Windows domain in the KACE K2000 appliance as a post installation task

Even though the KACE K2000 appliance has both join domain and rename computer post install tasks, they will not work when run in tandem. When the computer is renamed using the WSNAME utility, it has to reboot before the Domain_Join routine can run in order for the new name to take effect. Failure to reboot the computer means the computer will join the domain but with the old name rather than the one intended.

KACE created a new routine that will allow you to the domain join and rename the computer at the same time. This leverages sysprep or unattended scripted installs. Download the files here.

There are some changes you will want to make to the scripts. The attached file cannot be used as is because it contains bogus information about domain credentials and alike. Please note that the bat file names are different for Windows x86 and Windows x64.

  1. Extract the attached. In the ZIP file there is a folder called “source” and a batch file called “start.bat.” Open the source folder. This is where all the files you need to edit are located.
  2. Edit the 1_wsname.bat. On the first line is the command "c:\source\wsname.exe /N:$SERIALNUM /Logfile:C:\wsname.txt". You can change the naming convention to whatever you want following the wsname help files.
  3. Edit the 2_JoinDomain.bat file. On the first line is the command "C:\source\Join_Domain.vbs kace.com kuser kpassword 192.168.0.1" Replace “kace.com” with the name of your domain. If you have a complex domain name like k1000.corp.kace.com, you will need to enter it in that format. Replace “kuser” with the a domain user account.  This value will be in the clear when the script runs so you want to create an account in the domain that can  just join the domain and nothing else. Replace “kpassword” with the domain administrator password. Replace “192.168.0.1” with the IP address of the DNS server for your domain.
  4. Go back to the main folder with the start.bat file and the source folder. Highlight both the folder and the file and then ZIP them. This can now be used as a post install task by uploading this ZIP file and then entering “start.bat” in the command window.
  5. Finally, you will need to edit your sysprep image or scripted install. For sysprep, the file called C:\sysprep\sysprep.inf file. Under AutoLogOnCount=1 change the value to a 3. Auto log on is disabled after the script is complete. If you do not have this reference in your sysprep file, either create a new sysprep.inf file or modify the existing to allow AutoLogOn. For scripted installs you will need to edit the unattend.txt for XP or the Unattend.xml for Windows 7. Look for the reference <LogonCount>3</LogonCount> in Windows 7 or AutoLogonCount =  in XP.

[GuiUnattended]
    AdminPassword="password"
    EncryptedAdminPassword=NO
    AutoLogon=Yes
    AutoLogonCount=3

    OEMSkipRegional=1
    TimeZone=15
    OemSkipWelcome=1

DON'T FORGET TO CHECK THE "Use sysprep integration" CHECK BOX if YOU ARE RUNNING THIS USING SYSPREP!

(Note: In the K2000 appliance version 3.3 and newer, this check box has been removed.  The appliance automatically checks for sysprep integration and will automatically enable it if sysprep was used)

This set of batch files will also work with the K1000 appliance but these additional changes will need to be made.

  1. In 1_wsname.bat, un-REM the second, third, and fourth lines.
  2. In addition, third and fourth lines will need to be edited to reflect the proper username and password for the environment.

As this is a post install task in conjunction with sysprep, you will need to ensure you have prepared your image in accordance with these other FAQs.

KACE and Sysprep

Sysprep and Post Install Tasks

If post install task are currently working for you, just edit the sysprep.inf file and make the changes above.

Updated on: 10/31/2011