auto name computer during sysprep
We only have a K1000. I am trying to setup so when we image a system (clonezilla) it will name the computer based on serial number. I have been using wsname with a txt file for the name lookup, however, i cannot seem to get it to work after sysprep. I tried putting it in the setupcomplete.cmd, but it doesnt seem to run. If I execute it manually, it does work. Any suggestions? Is there a better way to do this without owning a K2000?
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
crist@cityhigh.org
12 years ago
Posted by:
kuedan
12 years ago
I am trying to get the system to rename on first boot after sysprep. The reason being i need for the units to have tha same name as before the imaging process so the KACE doesnt create a duplicate computer and use my unused licenses. Also, the only prob i can see with mysysprep is it is limited to serial number, mac or asset. With wsname, i have a txt file with serial numbers = machine name that it looks up and then names and joins the domain. I need this to happen before the kace agent checks in for the first time. I hope this makes sense....
Posted by:
cmccracken
12 years ago
Posted by:
Roonerspism
12 years ago
There is a pretty detailed method that David and I did regarding this exact same process.
The first version of the script which I released was based off not using the K2000 deployment.
The enhanced version of the script which David created is based off K2000 post install tasks.
Essentially what it does is uses an sql query based off WMI Serial number information pulled from bios and performs a rename.
It is worth noting that we also do things like, move in AD based upon an asset setting, install drivers based upon an asset setting and install packages based upon an asset setting.
Here's the link, give it a good read, Davids read me goes into good detail about figuring out the query tables easier:
http://itninja.com/question/name-machines-via-k1-with-k2-post-install-script
The first version of the script which I released was based off not using the K2000 deployment.
The enhanced version of the script which David created is based off K2000 post install tasks.
Essentially what it does is uses an sql query based off WMI Serial number information pulled from bios and performs a rename.
It is worth noting that we also do things like, move in AD based upon an asset setting, install drivers based upon an asset setting and install packages based upon an asset setting.
Here's the link, give it a good read, Davids read me goes into good detail about figuring out the query tables easier:
http://itninja.com/question/name-machines-via-k1-with-k2-post-install-script
Posted by:
ncsutmf
12 years ago
If you are joining a domain, whether it be a part of the sysprep config file or a script that runs after it boots up, a reboot will need to occur between the rename and the domain join. When it joins the domain, the name will have to be unique, so a fixed name in the sysprep file will not work if/when you have multiple machines imaging at the same time. I assume this is windows vista or 7 since you mentioned the setupcomplete.cmd script.
One solution I have seen has been to rename, reboot, autologin, and have a script run that then joins the domain and reboots again.
We're using the K2000, so we have the ability to run items while it is booted to the KBE (Windows PE) once it has either finished imaging or running the scripted OS install. We actually rewrite the unattend.xml file to set the name before it boots from the local disk. WSname had an option to do something similar with WinXP's sysprep.inf file but last I checked it did not support the new XML format that Windows Vista and 7 use. Not sure what boot environment clonezilla uses (guessing Linux) but if you had the ability to modify files on the local disk after it images but before it reboots, you could probably do something similar.
One solution I have seen has been to rename, reboot, autologin, and have a script run that then joins the domain and reboots again.
We're using the K2000, so we have the ability to run items while it is booted to the KBE (Windows PE) once it has either finished imaging or running the scripted OS install. We actually rewrite the unattend.xml file to set the name before it boots from the local disk. WSname had an option to do something similar with WinXP's sysprep.inf file but last I checked it did not support the new XML format that Windows Vista and 7 use. Not sure what boot environment clonezilla uses (guessing Linux) but if you had the ability to modify files on the local disk after it images but before it reboots, you could probably do something similar.
Comments:
-
The method outlined by David in his enhancements to our script no longer use wsname (uses XMLDOM instead) and makes it easy to edit the unattend.xml file from the pe environment. - Roonerspism 12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.