This should help
We run these 2 batch files from the USB drive itself. Backup--------------------------------------------- @echo off REM Check Windows Version ver | findstr /i "5\.0\." > nul IF %ERRORLEVEL% EQU 0 goto ver_2000 ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 goto ver_XP ver | findstr /i "5\.2\." > nul IF %ERRORLEVEL% EQU 0 goto ver_2003 ver | findstr /i "6\.0\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Vista ver | findstr /i "6\.1\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win7 ver | findstr /i "6\.2\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win8 ver | findstr /i "6\.3\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win81 goto warn_and_exit :ver_Win81 REM echo OS Version: Windows 8.1 (debug line) SET /P uname=Enter NEW Laptop Number: md ..\Backups\%uname% cd USMT\amd64 scanstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%uname% /uel:2013/09/01 /l:..\Backups\%uname%\%uname%_scanstatelog.log /progress:..\Backups\%uname%\%uname%_prog_scan.log /vsc /v:13 pause goto end :ver_Win8 REM echo OS Version: Windows 8 (debug line) SET /P uname=Enter NEW Laptop Number: md ..\Backups\%uname% cd USMT\amd64 scanstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%uname% /uel:2013/09/01 /l:..\Backups\%uname%\%uname%_scanstatelog.log /progress:..\Backups\%uname%\%uname%_prog_scan.log /vsc /v:13 pause goto end :ver_Win7 REM echo OS Version: Windows 7 (debug line) SET /P uname=Enter NEW Laptop Number: md ..\Backups\%uname% cd USMT\amd64 scanstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%uname% /uel:2013/09/01 /l:..\Backups\%uname%\%uname%_scanstatelog.log /progress:..\Backups\%uname%\%uname%_prog_scan.log /vsc /v:13 pause goto end :ver_Vista REM echo OS Version: Windows Vista (debug line) goto end :ver_2003 REM echo OS Version: Windows Server 2003 (debug line) goto end :ver_XP REM echo OS Version: Windows XP (debug line) SET /P uname=Enter NEW Laptop Number: md ..\Backups\%uname% cd USMT\USMT8\x86 scanstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\..\Backups\%uname% /uel:10 /l:..\..\Backups\%uname%\%uname%_scanstatelog.log /progress:..\..\Backups\%uname%\%uname%_prog_scan.log /vsc /v:13 pause :ver_2000 REM echo OS Version: Windows 2000 (debug line) goto end :warn_and_exit echo Machine OS cannot be determined. pause :end Restore-------------------------------------- @echo off REM Copy the marketing files xcopy "Marketing Files" "C:\Users\Public\Desktop\" /S REM Check Windows Version ver | findstr /i "5\.0\." > nul IF %ERRORLEVEL% EQU 0 goto ver_2000 ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 goto ver_XP ver | findstr /i "5\.2\." > nul IF %ERRORLEVEL% EQU 0 goto ver_2003 ver | findstr /i "6\.0\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Vista ver | findstr /i "6\.1\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win7 ver | findstr /i "6\.2\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win8 ver | findstr /i "6\.3\." > nul IF %ERRORLEVEL% EQU 0 goto ver_Win81 goto warn_and_exit :ver_Win81 REM echo OS Version: Windows 8 (debug line) cd USMT\amd64 loadstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%computername% /uel:2013/09/01 /c /l:..\Backups\%computername%\%computername%_loadstatelog.log /progress:..\Backups\%computername%\%computername%_prog_restore.log .\"restore metascreen.bat" Echo Your data has been restored pause goto end :ver_Win8 REM echo OS Version: Windows 8 (debug line) cd USMT\amd64 loadstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%computername% /uel:2013/09/01 /c /l:..\Backups\%computername%\%computername%_loadstatelog.log /progress:..\Backups\%computername%\%computername%_prog_restore.log .\"restore metascreen.bat" Echo Your data has been restored pause goto end :ver_Win7 REM echo OS Version: Windows 7 (debug line) cd USMT\amd64 loadstate.exe /i:MigApp.xml /i:MigUser.xml /i:HW_Custom_Mig.xml ..\Backups\%computername% /uel:2013/09/01 /c /l:..\Backups\%computername%\%computername%_loadstatelog.log /progress:..\Backups\%computername%\%computername%_prog_restore.log .\"restore metascreen.bat" Echo Your data has been restored pause goto end :ver_Vista REM echo OS Version: Windows Vista (debug line) goto end :ver_2003 REM echo OS Version: Windows Server 2003 (debug line) goto end :ver_XP REM echo OS Version: Windows XP (debug line) goto end :ver_2000 REM echo OS Version: Windows 2000 (debug line) goto end :warn_and_exit echo Machine OS cannot be determined. :end From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of configmgrarchive Sent: Thursday, 2 January 2014 8:00 PM To: ms...@lists.myitforum.com; scripting@lists.myitforum.com Subject: [scripting] USMT USB Scan state and restore We have a business case for XP to 7 migrations with USB sticks. I need to have a script that should take the USMT scan state back up to USB also Restore from USB only… Is this possible any scripts are available -- Thanks, ED Michael Adamson | IT Infrastructure Manager | Health World Limited 741 Nudgee Road Northgate QLD 4013 | Mobile: +61 421 000 241 | Tel: +61 7 3117 3300 | Fax: +61 7 3117 3381 Email: madam...@healthworld.com.au<mailto:madam...@healthworld.com.au> | Website: www.healthworld.com.au<http://www.healthworld.com.au> ________________________________ This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks with regards to this message or any attachments. We cannot accept liability for any loss or damage caused by software viruses.