REM This sample script is provided "AS IS" with no warranties, and confers no rights. REM For more information please visit REM http://www.microsoft.com/info/cpyright.mspx to find terms of use. REM Copyright 2010 Microsoft Corporation REM Simple batch script to fix up user shell folder registry values REM The empty SET commands are necessary to prevent the environment variables from being expanded by CMD and REG REM Note also that the variables are being escaped with double % marks - this is necessary when run in a CMD file REM This script code should be added to the end of the loadstate batch file being run during offline migration SET PUBLIC= SET ProgramData= reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Desktop" /d "%%PUBLIC%%\Desktop" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Documents" /d "%%PUBLIC%%\Documents" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "CommonPictures" /d "%%PUBLIC%%\Pictures" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "CommonMusic" /d "%%PUBLIC%%\Music" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "CommonVideo" /d "%%PUBLIC%%\Videos" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "{3D644C9B-1FB8-4f30-9B45-F670235F79C0}" /d "%%PUBLIC%%\Downloads" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Start Menu" /d "%%ProgramData%%\Microsoft\Windows\Start Menu" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Programs" /d "%%ProgramData%%\Microsoft\Windows\Start Menu\Programs" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Startup" /d "%%ProgramData%%\Microsoft\Windows\Start Menu\Programs\Startup" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common AppData" /d "%%ProgramData%%" /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /t REG_EXPAND_SZ /v "Common Templates" /d "%%ProgramData%%\Microsoft\Windows\Templates" /f