Question : How to redirect My Documents Folder on an unattended install

Hello,


I'am using MDT 2010 to deploy windows 7 with an unattended file and a task sequence.
We have two partition C and D.
I need to redirect the Libraries (Documents, Music, Pictures, Videos) to the D.

Note : I tried with the FolderLocations settings in the "Microsoft-Windows-Shell-Setup" area of the Windows 7 Unattend file, but windows dosent' like it (can't login, logon services corrupted)


Thank you for your help !

Daniel

Answer : How to redirect My Documents Folder on an unattended install

I found it !

Run this scritp with command.cmd and that's ok.

REM REGISTRY ENTRY


REM LOAD HIVE OF DEFAULT USER
REG LOAD HKEY_USERS\default_user "%SystemDrive%\Users\Default\ntuser.dat"

REM MY DOCUMENTS IN C:\Private

REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Personal /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Documents" /f
REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Favorites /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Favorites" /f
REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Pictures" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Pictures" /f
REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Desktop /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Desktop" /f
REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Video" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Videos" /f
REG ADD "HKEY_USERS\default_user\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Music" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Music" /f

REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Personal /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Documents" /f
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Favorites /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Favorites" /f
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Pictures" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Documents\Pictures" /f
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Desktop /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Desktop" /f
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Video" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Videos" /f
REG ADD "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V "My Music" /t REG_EXPAND_SZ /d "d:\%%USERNAME%%\Music" /f

REM UNLOAD DEFAULT USER HIVE
REG UNLOAD HKEY_USERS\default_user

pause
exit
Random Solutions  
 
programming4us programming4us