Apr 192018
 

I’ve come across a strange configuration in a recent XenApp deployment. I had to implement Folder Redirection on a XenApp server pointing to a local OneDrive folder on the client, shared as a network drive “\\client\onedrive$”.

So all I needed to do was to configure the Microsoft Folder Redirection in a GPO right? Wrong. The built-in redirection mechanism was not very happy with the network path “\\client\onedrive$”. I had recurrent failed drive mappings in the event logs and the users wouldn’t get their XenApp documents redirected to their local One Drive folder.

After several attempts, I finally decided to go via the old fashioned way hacking the User Shell Folders in the Registry. But with Windows 10 and Server 2016 the registry keys and values have changed since the Windows XP-7 era. It’s less intuitive and I had to dig to find what GUIDs was used to point to a local Document or Desktop folders. Finally, the setup is working fine! But I wanted to leave a billet with the GUIDs I needed to hack in the Registry to manually point the XenApp user folders to the client’s One Drive shared folder.

Now the list of the GUIDs you may use to manually implement folder redirections:

Desktop:

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: Desktop
Type: REG_SZ
Value: \\client\onedrive$\Desktop

Documents (redirection 1):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: Personal
Type: REG_SZ
Value: \\client\onedrive$\Documents

Documents (redirection 2):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: {F42EE2D3-909F-4907-8871-4C22FC0BF756}
Type: REG_SZ
Value: \\client\onedrive$\Documents

Pictures (redirection 1):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: My Pictures
Type: REG_SZ
Value: \\client\onedrive$\Pictures

Pictures (redirection 2):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: {0DDD015D-B06C-45D5-8C4C-F59713854639}
Type: REG_SZ
Value: \\client\onedrive$\Pictures

Music (redirection 1):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value: My Music
Type: REG_SZ
Value: \\client\onedrive$\Music

Music (redirection 2):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: {A0C69A99-21C8-4671-8703-7934162FCF1D}
Type: REG_SZ
Value: \\client\onedrive$\Music

Videos (redirection 1):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: My Video
Type: REG_SZ
Value: \\client\onedrive$\Videos

Videos (redirection 2):

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: {35286A68-3C57-41A1-BBB1-0EAE73D76C95}
Type: REG_SZ
Value: \\client\onedrive$\Videos

Downloads:

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Name: {374DE290-123F-4565-9164-39C4925E467B}
Type: REG_SZ
Value: \\client\onedrive$\Downloads

Links:

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Name: {BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}
Type: REG_SZ
Value: \\client\onedrive$\Links

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.