Why can't applications see the user environment variables ProfileUnity set, even though the values are in the user's registry?
With ProfileUnity Client 6.9.5, user environment variables set by the Environment Variables module can be missing from applications the user starts from the desktop on a sign-in where Windows creates the user's profile. The values are written to the user's registry, but File Explorer does not pick them up, so applications started from the Start menu, taskbar, desktop or File Explorer do not see them. On non-persistent desktops that discard the local profile at sign-out, this applies to every sign-in. This article describes the symptoms, the cause, how to confirm it, and the workaround until the fix ships in ProfileUnity 6.9.8.
See Environment Variables and Windows Options in the ProfileUnity 6.9.5 documentation.
📄 Contents
Status
| Issue Status | FIX IN PROGRESS |
| Fix Version | ProfileUnity Client 6.9.8 (not yet released) |
| Workaround Available | Yes, with conditions; see Workaround › |
The client notifies Windows of the variables again once the desktop has started, as part of the per-user run-once items Windows processes at sign-in. The variables become available to applications started after that point, which is once Windows processes those items after the desktop appears, not the moment it appears. This relies on Windows processing the user's run-once list, so it does not take effect where Group Policy stops that list from being processed (Do not process the run once list).
Affected Configurations
- ProfileUnity Client 6.9.5, including its hotfixes. Earlier versions have not been confirmed either way.
- Environment Variables rules with the User variable type. System variables were not affected in the testing behind the fix.
- Sign-ins where Windows creates the user's local profile: the user's first sign-in on a machine, and every sign-in on non-persistent desktops that discard the local profile at sign-out.
It was not observed when the user's profile was already on the machine and held the same variables from an earlier sign-in. A variable added or changed since the user's last sign-in was not tested in that case and may behave as it does on a new profile. How long the variables stay missing varies by environment: in some they appear on their own about a minute after sign-in, in others they do not appear for the rest of the session.
Symptoms
- An application started from the Start menu, taskbar, desktop, File Explorer or the Run dialog cannot find a setting, folder or server it reads from a user environment variable set by ProfileUnity.
- In a Command Prompt opened from the Start menu,
echo %VARIABLE_NAME%prints%VARIABLE_NAME%unchanged instead of the value. - The variable and its value are present under
HKEY_CURRENT_USER\Environmentand in the user's Environment Variables dialog. - On a persistent machine, the same variables work after the user signs out and signs back in.
Cause
By default, a Windows process gets a copy of its environment variables from the process that started it. Applications the user starts from the desktop are started by File Explorer, so they get File Explorer's copy. When a program changes a user variable, it writes the value to HKEY_CURRENT_USER\Environment and notifies running applications that the environment changed; File Explorer reloads its copy when it receives that notification.
By default, ProfileUnity's sign-in processing runs before Windows starts File Explorer, and the Environment Variables module runs first among each configuration's modules. It writes each variable and sends the notification, then sends it again from post-logon processing, which starts as the ProfileUnity sign-in finishes and runs while File Explorer is starting. On a sign-in where the profile is new, File Explorer starts without the variables and does not act on either notification, so it keeps its original copy. ProfileUnity does not remove the values at sign-out, so when the profile is already on the machine they are in the user's registry from the previous session when Windows builds the sign-in environment, and File Explorer starts with them.
Anything that makes File Explorer reload its environment brings the variables in. Desktop Refresh does this, which is why it works around the issue; where the variables appear on their own after a delay, something else in that environment is doing the same.
How to Confirm
Run the check in the affected user's session, on a sign-in where the profile was created.
Compare the registry value with what an application sees
Soon after sign-in, and before Desktop Refresh has run if it is enabled, open Windows PowerShell from the Start menu so it is started by File Explorer. Do not use Run as administrator or a new tab inside an already-open Terminal window, because those do not take File Explorer's copy of the environment. Run both lines, replacing VARIABLE_NAME with the name of a variable from the Environment Variables rule:
$env:VARIABLE_NAME
[Environment]::GetEnvironmentVariable('VARIABLE_NAME', 'User')
The first line shows what the PowerShell process received from File Explorer; the second reads the value saved in the user's registry. If the first line returns nothing, or a different value from the second, the session is affected. For Path, Windows combines the user and system values, so check instead that the second value appears within the first.
Workaround
Enable Desktop Refresh
In the configuration, enable Desktop Refresh in a Windows Options rule that applies to the affected users. Desktop Refresh notifies running applications of environment changes, among other refresh steps, and File Explorer reloads the variables when it runs.
- Desktop Refresh runs as part of Portability Management post-logon processing, so it runs only when the same configuration also has a Portability Management rule that applies to the user. It also does not run where the client setting
PortabilitySupportLegacyFormatisTrue(the default isFalse) and the user has no portability archives yet or only legacy-format archives. - It runs after any Portability Management rules set to process after logon, which can be a minute or more after the desktop appears. Applications started before then still do not see the variables and need to be started again.
- The environment notification comes from
LwL.ProfileUnity.Client.Refresh.exe, so it is skipped where that program is turned off through theDisableFeaturevalue underHKEY_CURRENT_USER\Software\Liquidware Labs\ProfileUnity(bit17592186044416), or whereSendMessageTimeoutsisFalsein its.configfile (the default isTrue). - Desktop Refresh also re-applies the user's mouse pointer scheme, which has been seen to change the pointer's appearance in Citrix sessions. To stop that, set
SetCursorstoFalseinLwL.ProfileUnity.Client.Refresh.exe.configon the image (C:\Program Files\ProfileUnity\Client.NETin a default installation), and check the setting again after upgrading the client. The user's own pointer scheme is then not re-applied by Desktop Refresh, so a customized pointer may not take effect.
Persistent machines
Where the local profile is kept between sign-ins, signing out and signing back in makes the variables available, because the values are then already in the user's profile when the session starts. This holds when the variable's value is the same at the next sign-in.
Related Articles
- ProfileUnity 6.9.5: Environment Variables
- ProfileUnity 6.9.5: Windows Options
- Preventing ProfileDisk Growth by Redirecting %TEMP% and %TMP% to Local Storage
| Product | ProfileUnity |
| Applies To | ProfileUnity Client 6.9.5 |
| Updated | November 17, 2026 |