/build/static/layout/Breadcrumb_cap_w.png

Using K2000 to maintain KUID through imaging - Deprecated in KACE SDA version 4.0 - This now a built-in automatic task.

Maintain KUID by Corey A. Serrins

Preinstall task (get) will capture a KUID from a machine, and store it in petemp as the machines MAC_address.kuid
Midlevel Postinstallation task (copy) will copy the *.kuid file from petemp to %systemdrive%\KACE\bin
Postinstallation task (set) will add the KUID into the registry and should come before agent installation.
*Note, the preinstallation and midlevel task have different architecture versions as KBE will only run the appropriate
architecture .exe. The post installation does not need different architecture build.
Also, in 5.1 and lower agents, the kuid is written correctly, but then the agent will create a new kuid, but there is no duplicate.

Get KUID
Create a new preinstallation application task. Select get_kuid.exe or get_kuid_x64.exe depending on the architecture.
For the commandline, enter in the name of the .exe (get_kuid.exe or get_kuid_x64.exe).
How get_kuid.exe works:
1. The active nic is found and the MAC address recorded.
2. The registry is searched for a KUID for 5.2 or higher and 5.1 or lower
3. A file is created on the T: drive (petemp) with the MAC address as its name and .kuid as the extension.
4. The KUID is recorded inside the file in step 3.
Copy KUID
Create a new postinstallation application task. Set the runtime environment to K2000 Boot Environment (Windows).
Select copy_kuid.exe or copy_kuid_x64.exe depending on the architecture.
For the commandline, enter in the name of the .exe (copy_kuid.exe or copy_kuid_x64.exe).
How copy_kuid works:
1. The active nic is found and the MAC address recorded.
2. Copy MAC_address.kuid from petemp to %systemdrive%\KACE\bin\MAC_address.kuid
3. Delete MAC_address.kuid from petemp
Set KUID
Create a new postinstallation application task. Set the runtime environment to Windows.
Select set_kuid.exe.
For the commandline, enter in the name of the .exe; set_kuid.exe.
How set_kuid works:
1. The post installation task reads the KUID from %systemdrive%\KACE\bin
2. The post installation task writes the KUID to the correct location for 5.1 and lower and 5.2 and higher.

v. 1.0.1.0 01/09/2012
-added /drive: switch to both get and copy kuid so that the kuid file can be stored to some place other than t: if you want.
This is helpful when deploying an image from usb, which does not have a network connection to the k2.

v. 1.0.0.1 12/06/2011
-add /silent switch to get_kuid so that if there was no kuid you wouldn't be nagged about it. (for clementa)

v. 1.0.0.0 11/21/2011
-Initial release
-pull in registry for HKLM\KACE and HKLM\Dell\KACE and store in petemp
-copy the file to %systemdrive%\KACE\bin
-write kuid to HKLM\KACE and HKLM\Dell\KACE

1 Comment   [ + ] Show comment
  • There isn't any information on how to get the kuid, I have a script only to apply not capture it. Please help. - londeaux 10 years ago

Answers (13)

Answer Summary:
The errors have been fixed and the application works as expected now. Original link goes to the new files.
Posted by: AJStevens 11 years ago
Senior Purple Belt
0

I thought this was working for us, but to my horror, just realised its not.

Checking the machines post scripted install, I see in the registry we have:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wow6432Node\Dell\Kace

Which is obviously one "Wow6432Node" too many... urgh, this and the new K1000 client are giving me such headaches for 64bit. Stop breaking things for 64bit with updates KACE! I'm thinking this is related to my recent whinge and what I'm currently raising with Kace/l3 support http://www.itninja.com/question/5-4-10622-32bit-only

The above bit is set by set_kuid.exe which I have no control over. I did take get_kuid.exe and get_kuid_x64.exe and combine them into a zip file with a check_kuid.vbs, what does this file do? Firstly it checks the processor and determines which get_kuid exe to use, then it gets the mac and checks the temp drive for an existing .kuid file (e.g. an interrupted or aborted install) and quits the script if it finds one. I found without this it would overwrite a .kuid file WITH data for a new BLANK one!!!

Posted by: clementa 12 years ago
Senior Yellow Belt
0
Just wanted to say that this is working perfectly for me.

I do have one request. Is there anyway to remove the "No KUID was found on this machine" message when no KUID is found? Maybe via a command line switch of some sort?

The reason I ask is I'd rather not have two separate scripted installs. ie. one with the KUID tasks (for reimaged workstations) and one without the KUID tasks (for new workstations or workstations where the hard drive has been replaced).

I really don't care if it does not find a KUID but I do want it to run on every workstation that is imaged/scripted just so that if there is one it'll do whatever it's supposed to do.

Make sense?

Thanks!
Andy C
Posted by: clementa 12 years ago
Senior Yellow Belt
0
Now that's service.

I no longer get the message "No KUID was found on this machine".

But, I do get an AutoIT error (line 470, File Y:\preinstall\28\get_kuid.exe: Error: Variable used without being declared.)

Andy
Posted by: clementa 12 years ago
Senior Yellow Belt
0
Same error. Variable used without being declared.
Posted by: cwmarshall 12 years ago
Senior Yellow Belt
0
Thank you very much for making this!

Am I right to assume though with version 3.4's lock down of petemp that this script will need to be updated to work?
Posted by: clementa 12 years ago
Senior Yellow Belt
0
Just an FYI.

Since Jan 17th, 2012, I have reimaged 167 workstations that included the get/copy kuid tasks. All workstations are showing up in the K1000 with the history of the original machine kace id. I'd say that this has been a success so far.

The only issue I'm having is dealing with the tech people in the school bitching that they have to add printers back to the workstations. Would it be possible to get a backup/restore printers task??
Posted by: scottlutz 12 years ago
Orange Senior Belt
0
Are you looking at network printers?

If so, you should be able to just backup the HKEY_CURRENT_USERS\Network settings to a reg file, and then import them after a re-image.

That will save you having to re-create them (I think)
Posted by: cblake 12 years ago
Red Belt
0
Another method might be to use the PrintUI Command line options:
Store all printer settings into a file:
rundll32 printui.dll,PrintUIEntry /Ss /n "printer" /a "file.dat"
Restore all printer settings from a file:
rundll32 printui.dll,PrintUIEntry /Sr /n "printer" /a "file.dat"
Posted by: clementa 12 years ago
Senior Yellow Belt
0
-Scottlutz - Not sure how to do that with the registry of the OS on the C: drive.

-cblake - I have thought of using printmig.exe and even the PrintUI command line options but wouldn't they be looking at the booted OS (ie Windows 7 PE/KBE Boot) and not at the OS on the c: drive?
Posted by: sdnbtech1 12 years ago
Fourth Degree Green Belt
0
Corey, so I'm a bit confused here, I downloaded the executables and created the tasks for this. When i add them to a system image and push it down to a machine I get an error telling me that there is no KACE\bin directory to copy the file from. I do not have the agent installed on the master image so I put the Set-KUID before the task to install the agent like your instructions said. Any suggestions on where I may have gone wrong. Thanks
Posted by: sdnbtech1 12 years ago
Fourth Degree Green Belt
0
Sadly, no I have all three tasks and their associated executables added to the image.
Posted by: sdnbtech1 12 years ago
Fourth Degree Green Belt
0
I will check the machine before booting out of kbe, good suggestion. I know the machine had a KUID because I was remoted into it through KACE and got a duplicate machine with a different KUID after the image process completed. Will update my post when I can test this tomorrow.

Comments:
  • Should the setkuid task be set first, and your join domain rename task last? In other words, will having the machine name set to something incorrect mess up the setkuid command? - edwimb 11 years ago
Posted by: jeffr 7 years ago
White Belt
0
How do I download the tasks?

Comments:
  • The link above goes to the Maintain KUID for Mac page, which has the download link of http://www.itninja.com/file/download/93 You must be a member of the K2000 Community to download. - cserrins 7 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

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

Sign up! or login

Share

 
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