Dec 01 2022 09:11 AM
I'm looking for a command or piece I can use in a Windows batch file to set the location of the special user folders (desktop, documents, downloads etc.). I can currently change this in Windows Explorer by right clicking on Desktop and changing the location from the default (C:\users\user\Desktop) to my alternative on the X: drive. However, I need the batch file to execute this change for me.
Many thanks
Dec 19 2022 11:52 PM
Mar 08 2023 01:32 PM - edited Mar 08 2023 01:33 PM
If you need to use a batch file, you can use a batch file to edit the registry keys for the shell folder locations at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folder
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Use with caution and backup. For safety, I like the mklink solution though.