KACE Product Support Question

Setup of Scripted Install asks for firm-coded Computer Name instead of Prompting at Run-Time

07/29/2016 757 views
I'm new to scripting installs, but when I set up a scripted install, it asks for a computer name (or offers to create a random name). This seems crazy to me, because if I'm going to be imaging 20 machines this week, I'll have to create 20 scripted installs, one for each name. And then another 20 next week....

Instead, I want to prompt the person kicking off the install what the computer's name should be, at the very beginning of the process, rather than firm-coding it in the script. I see references to "GetComputerName", but no explanation of how that interacts with the firm-coding done in the script. I don't want the computer added to the domain with the wrong name, just to change it later with the Get/SetComputerName tasks, leaving the old name dangling in the domain, etc.

What's the best way to accomplish my desire?

1 Comment   [ + ] Show comment


  • Same issue for other stuff, like registration name. I don't want all my scripted installs to be registered to one person.

All Answers

The best method I could recommend is not have it join the domain in the unattend.xml file that it runs with the scripted install. Then use the get/set computer name tasks to ask input for the computer name, this gets stored on the X ram-drive while the system is in the KBE. The set-computer name then uses that information to update information for when Windows runs the first time.

Using WSName is also a method to input a name on the system.

Use a post task to have the system join the Domain (should be an example of one in the post task library).

Answered 07/29/2016 by: TheAustinDave
Brown Belt

I use the Get/SetComputerName method for all my scripted installations. In the script I leave it as a random name, then I have the GetComputerName run as a pre-install task, which will launch a prompt asking you for the name. 

Create Pre-install task:
Upload GetComputername.exe and add parameters: "GetComputerName_x64.exe /dialog /timeout:120" (the timeout can obviously be adjusted) Make sure your Runtime Env = K2000 Boot Environment (Windows)

Create Post-install task:
Upload SetComputername.exe and add parameters: "SetComputerName_x64.exe" 
Make sure your Runtime Env = K2000 Boot Environment (Windows)

The Mid-Level task, SetComputerName names the PC which happens prior to the joining of the domain, through the script.  You lose the automation of naming your PCs through a post install task, but you ensure you PCs have the right name right from the start.

Hope this helps!
Answered 08/03/2016 by: Soloman007
Orange Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ