VMware Horizon Community
tpc1337
Contributor
Contributor

VMware DEM folder redirection and command line utilities

Greetings,

We are using the folder redirection feature from VMware DEM for a while now, and it always works as expected. Until recently we were testing with the command line utility Git4Windows (Git Bash), and noticed that when browsing to the Desktop via the Git Bash client,(which is redirected in DEM), files saved there where not redirected to the users' archive. It seems that when redirecting folders such as Desktop, Documents and Downloads; DEM itself creates a seperate set of these folders in the users' profile directory ( e.g. C:\Users\%username%\Desktop, C:\Users\%username%\Documents and C:\Users\%username%\Downloads) . When putting a file in one of these folders, the file isnt redirected to the profile archive on the file server. I noticed that DEM creates shortcuts for Desktop, Documents and Downloads under C:\Users\%username%\Links\. When placing files in one of these directories ( e.g. C:\Users\%username%\Links\Desktop\ ), the files are immediately redirected to the users' profile archive. But since command line utilities like Git Bash cannot traverse through an actual shortcut (.lnk for C:\Users\%username%\Links\Desktop.lnk), it does not seem possible to edit and save files in these locations. My question is, is there a possibility to use command line utlities such as Git Bash together with folder redirection?

 

Kind Regards,

 

Tim

0 Kudos
1 Reply
DEMdev
VMware Employee
VMware Employee

Hi @tpc1337,

Those folders in C:\Users\%username% are just the default locations for these user profile sub folders. Folder redirection is a Windows mechanism that points "conceptual" folders like "Desktop" or "Documents" to another location. Applications need to query Windows for the actual "physical" location of a particular "conceptual" folder; it's not the case that I/O against the default location is redirected to the redirected location.

If you configure folder redirection through the "standard" Microsoft Group Policy setting, you have an option to move the folder to the redirected location. DEM is focused on managing user settings rather than data, so it only configures the new location without touching the original folder. You can of course easily create a script to remove these after redirection.

To be honest, I'm not sure how to best work with redirected folders from the command line, as there's no equivalent to the Desktop, Documents, et cetera concepts that File Explorer and the Windows API use. Maybe you could create environment variables to point to the redirected locations?

0 Kudos