VMware Horizon Community
ScottTrowbridge
Contributor
Contributor

Environmental variables

Profile Cleanup -> The manual indicates to use a \[EXPAND ENV VARS] at the end of a line

"You can use environment variables in the registry and file system paths of the Import / Export and Profile Cleanup settings. Each line you want to expand must end with \[EXPAND ENV VARS]."

As an example:

<AppData>\Roaming\Microsoft\Internet Explorer\Quick Launch

We would like to use a variable in place of <AppData> to remove items that are located elsewhere.

If we have a system variable DEM_Computer_Name how would the example (above) be written appropriately?

Reply
0 Kudos
3 Replies
DEMdev
VMware Employee
VMware Employee

Hi @ScottTrowbridge,

That \[EXPAND ENV VARS] option only tells the DEM agent to expand env vars in the content before that token, to support scenarios like <AppData>\Badly\Written\App\%USERNAME%\user-specific-data\[EXPAND ENV VARS].
Env var expansion does not change the overall functionality, so lines still need to start with a folder token.

DEM is meant to manage settings inside the Windows user profile. If you need to manage settings for an application that stores its settings elsewhere, we recommend copying those settings to/from a "real" profile location at logoff and logon (or application exit and start, for DirectFlex-enabled applications), and referencing that profile location in the DEM personalization config file.

Reply
0 Kudos
ScottTrowbridge
Contributor
Contributor

 

Spoiler
Thank you for the reply.

Our example needs to change the directory to a network share.

Where our variable ( %DEM_HomeProfile% ) is being used as a 'Folder Token' and its value would be similar to \\vmware\profile\'username'

Example: 

%DEM_HomeProfile%\Roaming\Microsoft\Internet Explorer\Quick Launch\[EXPAND ENV VARS]

Within 'Profile Cleanup' the path (above)  is underlined in red indicating it is invalid.  

And although the example below isn't functionally correct, it does not have a red line, assumably  because we're using the predefined 'Folder Token'

Example: 

<AppData>\Roaming\Microsoft\Internet Explorer\%DEM_HomeProfile%\Quick Launch\[EXPAND ENV VARS]

If the above is all true then, what is the work around?





 

 

Reply
0 Kudos
DEMdev
VMware Employee
VMware Employee

Hi @ScottTrowbridge,

Profile cleanup can only be used for settings within the Windows user profile ("addressed" via folder tokens, or HKCU registry paths.)

To remove information from another location, I'd suggest to use a DEM logoff task.

Reply
0 Kudos