Using User State Migration Tool with a KACE K2000 Remote Site Appliance

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




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


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:




  • good article - SMal.tmcc 10 years ago
  • When I run this I get the error "the subsystem needed to support the image is not present" when capturing the user state. Our systems are Windows XP 32 bit, but we are using a 64 bit KBE to deploy Windows 7 64 bit. - abryant 9 years ago
    • It sounds like it's choosing the wrong architecture. What happens when you copy that task to a batch file and run it from within Windows? - kcorrie 9 years ago
      • I was actually able to fix this by inserting this command into the pre-installation task before running scanstate:

        Originally the problem was that it was selecting the 64 bit architecture because the KBE was 64 bit, but it was giving me an error trying to scan the 32 bit windows directory. When I tried to force it to select the 32 bit version it gave me the above error.

        SET MIG_OFFLINE_PLATFORM_ARCH=32 allows the 64 bit USMT tool to run scanstate on a 32 bit target. - abryant 9 years ago
      • Being in the 64-bit KBE it would launch from the AMD64 folder but I wasn't sure if that'd be a problem when capturing from a 32-bit computer since I hadn't tried it myself.

        Another thing you could do is check for the presence of "Program Files (x86)" to help choose the correct architecture automatically. - kcorrie 9 years ago
  • I am not able to use the %MAC_ADDRESS% value. It does not show in the list of variables when I type SET and I cannot echo it? Am I missing something simple? - Kace_559 9 years ago
    • You are not trying to use it in your post-task are you? It works in the pre- and mid-level tasks because you're still in the KBE. Once you've imaged and started running your post-tasks, you're in Windows and the variable doesn't work anymore (hence the mid-level task to put the MAC in a test file). - kcorrie 9 years ago
This post is locked

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