Help to config folder location on new installation of windows 10


  1. Posts : 8
    windows 10
       #1

    Help to config folder location on new installation of windows 10


    Hi Brink,

    Greatly appreciate if you can help me.

    Purpose is to use a batch or reg method to config folder location on new installation of windows 10.

    Can you create one batchfile or reg to set

    Documents, Favorites, Music, Pictures, Videos location in D drive
    Downloads in E drive

    I have tried reg method as follow and it does not work


    Code:
    ;=======================================================================
    ;            Folder
    ;=======================================================================
    
    
    ;Folder View  (windows explorer)
    [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
    "FolderType"="NotSpecified"
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    "NoSaveSettings"=-
    
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    "NoSaveSettings"=-
    
    
    ;Folders location
    ;Have to import favorates  Edge  ...  settings   import or export
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
    
    
    "Favorites"=hex(2):44,00,3a,00,5c,00,46,00,61,00,76,00,6f,00,72,00,69,00,74,00,\
      65,00,73,00,00,00
    
    "Music"=hex(2):44,00,3a,00,5c,00,4d,00,75,00,73,00,69,00,63,00,00,00
    "{A0C69A99-21C8-4671-8703-7934162FCF1D}"=hex(2):44,00,3a,00,5c,00,4d,00,75,00,\
      73,00,69,00,63,00,00,00
    
    "Pictures"=hex(2):44,00,3a,00,5c,00,50,00,69,00,63,00,74,00,75,00,72,00,65,\
      00,73,00,00,00
    "{0DDD015D-B06C-45D5-8C4C-F59713854639}"=hex(2):44,00,3a,00,5c,00,50,00,69,00,\
      63,00,74,00,75,00,72,00,65,00,73,00,00,00
    
    "Video"=hex(2):44,00,3a,00,5c,00,56,00,69,00,64,00,65,00,6f,00,73,00,00,00
    "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"=hex(2):44,00,3a,00,5c,00,56,00,69,00,\
      64,00,65,00,6f,00,73,00,00,00
    
    "Personal"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,\
      74,00,73,00,00,00
    "{F42EE2D3-909F-4907-8871-4C22FC0BF756}"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,\
      63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,00,00
    
    ;E:\Downloads
    "{374DE290-123F-4565-9164-39C4925E467B}"=hex(2):45,00,3a,00,5c,00,44,00,6f,00,\
      77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00
    "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"=hex(2):45,00,3a,00,5c,00,44,00,6f,00,\
      77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00
    Last edited by illusion; 25 Oct 2019 at 11:33.
      My Computer


  2. Posts : 11,612
    Windows 10 Home x64 Version 21H2 Build 19044.1776
       #2

    I assume the values are taken by exporting from a Registry key that had been manually set up.
    - What is the result i.e. what happens to the paths in that Registry key in comparison to what was intended?
    - Perhaps the result would be different if you removed the line breaks after the \ symbols? I've just checked a different Reg file with the same pattern - it operates successfully even though I have not altered any line breaks
    - Perhaps you can screenshot the Registry key from which the Reg file was written and the Key's state after the Reg file was used on a different computer/user
    - I have always assumed that the Reg file would need to be used after the user account concerned had been created [I note that you have referred to a new installation so am not sure that this was the sequence you used]


    Downloads folders are a different matter. They are different for different browsers.
    IE default downloads are in the item Default Download Directory within
    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
    whereas Edge default downloads are in the item Default Download Directory within
    HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wek yb3d8bbwe\MicrosoftEdge\Main

    Denis
      My Computer


  3. Posts : 8
    windows 10
    Thread Starter
       #3

    Hi Try3 thank you for your reply, yes i exported the registry after manually configuration. It does not work always when I applied to different computer and / or users.

    Therefore, in reference to Restore Default Location of Personal Folders in Windows 10 . Perhaps Brink , can you code a batch file for me to set

    Documents, Favorites, Music, Pictures, Videos location in D drive
    Downloads in E drive

    Thanks
      My Computer


  4. Posts : 11,612
    Windows 10 Home x64 Version 21H2 Build 19044.1776
       #4

    illusion said:
    Therefore, in reference to Restore Default Location of Personal Folders in Windows 10 . Perhaps Brink , can you code a batch file for me to set ...
    If you look at the Related tutorials list at the end of that one, you will see tutorials for changing Documents, Music, ... user folders. Perhaps, if you look through those including the posts at their end, you might find an example of a successful Reg file use that you could then use as your guide for doing all the others.

    Denis
      My Computer


  5. Posts : 8
    windows 10
    Thread Starter
       #5

    Finally figured it out using Brink's batfile in reference to Restore Default Location of Personal Folders in Windows 10 .



    Code:
    taskkill /f /im explorer.exe
    
    timeout /t 2 /nobreak >nul
    
    
    if not exist "D:\\Documents" mkdir "D:\\Documents"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /t REG_SZ /d "D:\\Documents" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{f42ee2d3-909f-4907-8871-4c22fc0bf756}" /t REG_EXPAND_SZ /d "D:\Documents" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_EXPAND_SZ /d "D:\Documents" /f
    attrib +r -s -h "D:\\Documents" /S /D
    
    
    if not exist "D:\\Favorites" mkdir "D:\\Favorites"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Favorites" /t REG_SZ /d "D:\\Favorites" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Favorites" /t REG_EXPAND_SZ /d "D:\Favorites" /f
    attrib +r -s -h "D:\\Favorites" /S /D
    
    
    if not exist "D:\\Music" mkdir "D:\\Music"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Music" /t REG_SZ /d "D:\\Music" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{A0C69A99-21C8-4671-8703-7934162FCF1D}" /t REG_EXPAND_SZ /d "D:\Music" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_EXPAND_SZ /d "D:\Music" /f
    attrib +r -s -h "D:\\Music" /S /D
    
    
    if not exist "D:\\Pictures" mkdir "D:\\Pictures"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /t REG_SZ /d "D:\\Pictures" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{0DDD015D-B06C-45D5-8C4C-F59713854639}" /t REG_EXPAND_SZ /d "D:\Pictures" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "D:\Pictures" /f
    attrib +r -s -h "D:\\Pictures" /S /D
    
    
    if not exist "%UserProfile%\Videos" mkdir "%UserProfile%\Videos"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Video" /t REG_SZ /d "D:\\Videos" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{35286A68-3C57-41A1-BBB1-0EAE73D76C95}" /t REG_EXPAND_SZ /d "D:\Videos" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Video" /t REG_EXPAND_SZ /d "D:\Videos" /f
    attrib +r -s -h "D:\\Videos" /S /D
    
    
    if not exist "E:\\Downloads" mkdir "E:\\Downloads"
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /t REG_SZ /d "E:\Downloads" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}" /t REG_EXPAND_SZ /d "E:\Downloads" /f
    reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}" /t REG_EXPAND_SZ /d "E:\Downloads" /f
    attrib +r -s -h "E:\\Downloads" /S /D
    
    timeout /t 1 /nobreak >nul
    
    start explorer.exe
    Last edited by Brink; 26 Oct 2019 at 09:33. Reason: code box
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:59.
Find Us




Windows 10 Forums