Follow

XenDesktop with ProfileDisk is not available in time for next session after logoff.

Product: ProfileUnity

Product Version: 6.5 and newer

Expires on: 365 days from publish date

Updated: February 2, 2017

 

Problem:

Users in my XenDesktop environment logoff and log in again before another desktop is finished logging off in earlier session. 

When user selects "Logoff" or "Shut down" button the user's session is immediately disconnected by Citrix. User is brought back to logon screen on thin client unaware that the old session is still logging off. If the user attempts to login back within short period of time (about 1 min from logoff) the next session is broken because the new session fails to connect to profiledisk which is open do to running logoff scripts. 

Symptoms:

The new desktop does not have any user's settings saved. No profiledisk is mounted to the desktop.

Possible Resolution(s):

The optimal solution would be to run windows logoff after ProfileUnity scripts will finish detaching ProfileDisk. This will require disabling windows logoff/shutdown and placing logoff button on user's desktop.

Summary: 

  1. Remove "Logoff" and "Shut Down" buttons from user's desktop, and remove "Logoff" from Alt-Ctrl-Delete screen.
  2. Modify lwl.profileunity.client.logoff.exe.config to initiate our shutdown after completing running logoff scripts.
  3. Create "Logoff" shortcut on user's desktop with custom icon.

Step 1. - Add registry rules to your ProfileUnity configuration.

Note: Registry keys below only apply to windows 7

Remove Logoff from start menu:

  • Hive: HKEY_CURRENT_USER
  • Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  • Type: REG_DWORD
  • Value: StartMenuLogOff
  • Data: 1

Remove logoff from Alt-Ctrl-Del:

  • Hive: HKEY_CURRENT_USER
  • Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  • Type: REG_DWORD
  • Value: NoLogoff
  • Data: 1

Remove Shut Down button:

  • Hive: HKEY_CURRENT_USER
  • Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  • Type: REG_DWORD
  • Value: NoClose
  • Data: 1

Switch Windows Explorer "Shutdown Button" to display "Lock"

  • Hive: HKEY_CURRENT_USER
  • Key: Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  • Type: REG_DWORD
  • Value: Start_PowerButtonAction
  • Data: 200

Example:

Step 2. - Configure our logoff to initiate desktop shutdown.

Go to ProfileUnity client tools directory (%systemroot%\SYSVOL\domain\scripts\ProfileUnity) (<Domain>\Netlogon\ProfileUnity)

Edit LwL.ProfileUnity.Client.Logoff.exe.config.  

Change setting:

<setting name="Shutdown" serializeAs="String">

<value>False</value>

To

<setting name="Shutdown" serializeAs="String">

<value>True</value>

Example:

Step 3. - Setup "Logoff" Button on user's desktop.

  1. Download "Log_Off_Icon.zip" found on the bottom of this KB.
  2. Extract Log_Off_Icon.zip to your "<Domain>\Netlogon\ProfileUnity" directory.
  3. Create new "Shortcut" rule in ProfileUnity Configuration. (Open "Advanced" tab)
  • Type: Shell Shortcut
  • Shortcut Name: LogOff
  • Shortcut Location: User Desktop
  • Target: <Domain>\Netlogon\ProfileUnity\LwL.ProfileUnity.Client.Logoff.exe
  • Icon File:<Domain>\Netlogon\ProfileUnity\Log Off.ico

Example:

 Note: If the launching of the shortcut opens a security warning. Please follow instructions in this KB: "Open File - Security Warning" - How Trust UNC Path Using ProfileUnity to eliminate the warning.

Related KB: ProfileUnity Logoff Script Is Terminated Early On XenDesktop  

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.