Great article mate! I had followed Niall’s and Peter’s articles as well, and great that they are had run into some issues as well. I had to do some customising of the batch files to get them working in my environment going from 32-bit XP to 64-bit Win 7.
I think you’re scripts here look much cleaner and make the TS easier to manage. Will have a play in my test network with them, but am confident already just reading this that they will be much easier to configure!
Awesome….keep up the great work! :-)
Hi Adrian! Glad you liked it! Please keep me posted how it went!
have you checked out the multi-purpose windows-noob.com FrontEnd HTA yet ? it takes offline mode one step further in allowing you to backup data (offline mode in WinPE without hardlinking) to the network), it also does offline mode with hardlinking for refresh scenarios,
check it out and give me your thoughts
That looks really neat Niall!
I’ll have a more in-depth look at it later on!
I’m wondering how do you got it working with “some customizing of the batch files”. I’m trying to get it working since two days, but I think I miss a thing (or two). Maybe you can point me in the right direction? I changed the folder in the script to x86, but it seems that scanstate will not run on xp 32-bit. And the Task “Unload registry” stops with error 0x0000001)
Thanks in advance for helping out
and thanks to Mathias for this great article (Win7 to Win7 works like a charme)
Scanstate should run fine on 32-bit.
1) Did you update the USMT-package after you changed the script(s) ?
2) What’s the error message from Scanstate?
3) Did you check in c:\USMT that it really copied the x86-folder and not amd64? (Use F8 during the installation.)
4) Unload Registry is only necessary with USMT and 64-bit Windows so you can remove that step from your Task-sequence.
thanks a lot for replying quickly and helping out with my issue. But the only thing I’ve done wrong was selecting the wrong Bootimage (x64) in the “32-Bit-TaskSequence”.
Now, my (your) TaskSequences are running fine.
Thanks a lot
Great, I’m glad you solved the problem!
Tchüß aus Schweden.
Great blogs, this is awesome for a newbie in SCCM OSD project.I couldn’t wait to try your HardLink TS tomorrow, I’ve struggling with USMT for weeks.
Do you have a sample TS for SMP? or can you give a me a few pointer how to create one? My current TS is not working.
Found this blog after beating my head against the wall trying to use SMP migration. I have basically used your TS with the addition of some driver and software installations. I am running into an error with the registry unload section.
The smsts.log is giving me ERROR: The Parameter is incorrect/Failed to run the action: Unload Registry. incorrect function. (error:00000001; source:Windows)
The TS is being ran on a WinXP x86, I am using the WinPE x86 boot image.
I edited away the logfile that was very long. /Mathias
If you read the post again you’ll see that when running x86-Windows you don’t need to unload the registry hive with “reg unload”. It’s only necessary for x64-Windows and USMT.
Good Stuff Mathias. Thanks very much. Very clean and explained thoroughly.
Thanks for this. Worked great but only one issue which is quite a big one. I am migrating from Windows XP 32 bit to Windows 7 64 bit on the same machine.
It goes through this process with no errors but when my machine boots into Windows 7 there are no traces of logs or my previous data.
First I’d check if the OSDStateStorePath is set (otherwise everything on the disk will be lost).
Then I’d run the F8/Command Prompt at the moment when the Restore Part is about to run in order to see what’s going on. I would then check the logfiles scanstate.log (which is for backup) and loadstate.log (which is for restore).
Also make sure that you actually don’t format your harddrive. If you’re using the Task-sequence step “Partition Disk 0”, check that it has options only to run if there’s no Windows-folder on the disk. (See above.)
The Loadstate.log says “USMT returned an error code (0x0000001c). Look USMT log file loadstate.log for detail error message.. The operating system reported error 2147942428. The printer is out of paper”
I’m guessing that loadstate.log is saying something like : “[0x000000] Script file is not present: ‘C:_SMSTaskSequencePackagesABC00123md64 ile.xml”
Could you please check loadstate.log and check if all files are within the USMT-package and then update the Distribution point?
The log says: “Script file is not present: C:\_SMSTaskSequence\Packages\XXX0005A\amd64\miguser.xml”
Is Miguser.xml in the USMT-package below amd64 ?
I am receiving vbscript errors when running this receiving incorrect function errors in the logs. Looking at the vbs scripts in vbs edit and notepad ++ I’m showing line 16, column 1 subscript out of range, the storage control block is invalid. any ideas? the exact error in smsts is:
“C:\_SMSTaskSequence\Packages\P020020B\copy_and_runscanstate.vbs(15, 37) Microsoft VBScript compilation error: Expected ‘)’ ”
any help appreciated!
Sounds a lot to me like you’ve edited the script since that error indicates that there’s a missing end bracket around line 15. Either find that missing bracket or try to download the script again.
I downloaded , renamed and replaced the batch files. On running the task sequence it copies the files over yet is still crashing on the first vb script and the registry hive from what I can tell from the logs. I have attached the smsts log for reference. Copying the entire package directory to my desktop and running the .vbs files manually they are throwing the same errors. Any Help is GREATLY appreciated!
update: applied a filter to ignore unloading the registry hive if this is running on a 32 bit xp machine……I’ll get back on it in the a.m……thank you for the help so far!
after taking a break and sleeping on it to get a fresh perspective, I reread the logs. Re-copying the .vbs scripts did correct that issue. What I am having problems with now is the unload registry step,” cmd /c REG Unload HKLM\$DEST$Software”. That command is refusing to run throwing incorrect function errors and bringing the TS to a screeching halt. Any suggestions on that step sir?
Is that 32bit Windows you’re running ?
“When running x86-Windows you don’t need to unload the registry hive with “reg unload”. It’s
only necessary for x64-Windows and USMT.”
thank you! I just deleted that step in the sequence. down to my last two problems,(I hope)! On the Partition Disk 0 (Bare Metal), it runs, even with the conditions in place, wiping out my state store!
I am posting a picture of the task sequence and step in the technet forums here:
second problem: while the task sequence is running, it creates the OSDStateStorePath of C:\USMToffline, verified via F8, My Set restore options are present and correct. copy_and_runscanstate.vbs runs and “gathers” user data, yet while checking the statestore folder, no data gets placed there! Reading the loadstate.log I get the following error:
invalid store path; check the store parameter and/or file system permissions[gle=0x00000006]
and the USMT process basically fails. I disabled the “remove state Storage” step so I could verify it was there and verify its contents,( no user data). I just spend an hour and a half slowly going through the guide, step by step, checking and rechecking everything. Where should I go from here to get this running correctly sir?
got it working my friend! Thank you SO much!!!
That’s great! I’m glad to hear it.
I am new in SCCM, so sorry about possible silly questions. I have build up a base image (wim file) that has all the apps and basic configurations. For the final deploy for my users i have a TS that apply that base wim with a few other step, namely driver packages and a registry change that redirects the folder “users” for the D: drive. Everything works fine, Now what i need to do is to build a new TS for refresh scenarios, following the above explanation everything seems to work fines, except for the fact the my profiles are located on d:\users, and when the TS finishes one of the two scenarios happens:
a) if i use the step to redirect the users profile do drive D:, when i logon to the machine it creates a second profile in the D: drive. For example if the user is John, a have a john profile (the old one containing the real data) and a new one DOMAIN\john, which of course is empty without the migrated data.
b) if i simply just disable this redirection step, when i logon it creates a new profile named john in drive c:\users and it just ignores the old profile in D:\users\john
I need to maintain the D:\users\john profile and that after the refresh when the user logon it assumes the old profile. Can anyone help me in this situation? what on hell am i doing wrong ….
Thanks on advanced :)
When trying to load the profile it can’t find the offline
store. It’s looking for c:\usmtoffline\usmt\usmt.mig
. I can see on the machine that the scanstate actually backed
up all the profiles but it backed up using
c:\usmtoffline\usmt\catalog.mig. I can’t seem to find out where I
can correct this.
did you get your issue resolved .. i am having the same issue.. how
hi there Thanks for this post, it has been a great help!
well done! I am struggling with the REG unload section however, can
you please assist. I get a failure during my TS on the “Registry
unload” section. I’m using ax64 OS so this step is still necessary
for me to get right. I tried looking for my scanstate log but cant
seem to find it, am I correct I should be looking for it in
c:windowstempSMSTSLogscanstate.log, I cannot find it there. I’m not
even sure my scanstate command has run correctly. I attached my TS
log files for your review also, perhaps you can spot what the
This is great info Mathias. I know this post is rather old, but I was wondering if anything has changed for use with USMT 5. Thanks.
Huge help here. Much appreciated. Been working on this for weeks. Was close, but this got me to the finish line.