I recently had the task of making USMT work on our RSA's for Windows XP to 7 migrations at our satellite offices. Natively, KACE K2000 does not support the use of USMT at remote sites but I was able to make this work with a litte research and help from the ITNinja.com community. Since this seems to be a common question without a concrete answer, it was suggested I write a blog giving the how-to of it. So here we go...
We'll accomplish this with three tasks: a preinstallation task to capture the profile, a mid-level (KBE environment) post-installation task to create a unique system ID variable and a Windows environment post-installation task to apply the profile.
Capture the profile
xcopy S:\USMT\%PROCESSOR_ARCHITECTURE% C:\USMT\%PROCESSOR_ARCHITECTURE% /I /S /Q /Y set USMT_WORKING_DIR=C:\USMT\%PROCESSOR_ARCHITECTURE% C: && cd C:\USMT\%PROCESSOR_ARCHITECTURE% scanstate S:\USMT\%MAC_ADDRESS% /offlinewindir:c:\windows /i:migapp.xml /i:miguser.xml /all /o /progress:S:\USMT\%MAC_ADDRESS%\proglog.txt /v:13 /l:S:\USMT\%MAC_ADDRESS%\scanlog.txt
Your first step will be to put the USMT files on a server where they can be accessed by the computer being imaged while in the KBE. The USMT Files can be had at C:\Program Files\Windows AIK\Tools\USMT from a compter with WAIK installed. You'll notice my task is accessing a server mapped as S:\ for the USMT files. I mapped my server as part of the RSA KBE creation with KBE Manipulator. An alternative is to add net use to the beginning of this task to map the S:\ drive.
This task is copying the files for the correct architecture from the server and running them locally from the C: drive. It then copies the captured profile back to the server in a folder named as the computer's MAC address onto the server. Save it as a preinstallation task type BAT script.
Save the computer's MAC address in a file
echo %mac_address% > C:\usmt_mac.txt
This script captures the computer's MAC address to a file after the computer has been imaged but before it leaves the KBE. The reason for this is the %mac_address% variable doesn't work in the Window environment so we can't use it in the postinstallation task to apply the profile. Save this as a postinstallation BAT script and choose K2000 as the runtime environment.
Deploy the profile
net use S: for /F %%i IN (C:\usmt_mac.txt) DO set mac=%%i S: && cd S:\USMT\%PROCESSOR_ARCHITECTURE% loadstate s:\usmt\%MAC% /i:s:\usmt\%PROCESSOR_ARCHITECTURE%\migapp.xml /i:s:\usmt\%PROCESSOR_ARCHITECTURE%\miguser.xml /l:s:\usmt\%MAC%\mig.log /v:5 /lac /lae net use S: /delete
Notice in this script I have net use to map the S: drive. Since we've left the KBE, our drive mapping is gone so we have to reapply it in the Windows environment. Also notice the for satement that reads the contents of the file we created in the mid-level task to get the computer's MAC address so it knows which profile to apply from the server. Save this as a postinstallation task BAT script and select the Windows runtime environment.
That's it! This is all done in version 3.6 and I expect it to work in later releases. With the introduction of the task engine and the way installation tasks are handled, I can't say for sure how well this will work on earlier releases so you may need to do some tweaking.
Be sure to check out these links to learn more about scanstate and loadstate for USMT: