Windows Live Alerts
Start access
Support Forum
Remote Desktop Services
Terminal Services
Web Interface
Tips & Tools
Lassen Sie sich von einem Experten Beraten

Windows An- und Abmeldeprobleme Print E-mail
Written by Thomas Koetzing on Thursday, 09 February 2006

(Last modified:Thursday, 14 May 2009 | Visit 179925 times)

This WebSite is dedicated to the presentation I hosted at the Citrix Support & Engineering Institute of Technology (CSEIT) in Orlando 2004 , 3rd. of October.

I have written a white paper on troubleshooting the logon- and logoff process that you can download here:


Read also my article "Understanding the Citrix MetaFrame Logon and Logoff Process" and "Understanding and Troubleshooting Citrix's Seamless Windows Engine"

Here is also the place where you will find the most current version of the "seamless exception flags - EXTENDED"

Microsoft Terminal Licensing Service (TLS)

In any case you have to deploy the TLS when you start using Microsoft terminal services in application mode. It's of no interest what client OS you use to connect to the Server. Also remember, Citrix MetaFrame is just an add-on to terminal services so you need the TLS also with Citrix!

Image NOTE

  • Terminal Licensing Service MUST be deployed and activated!
  • Microsoft Clients do NOT have a "built-in” TS Client Access License, rather the TLS might issues machines with a free “built-in” license.
  • With Windows 2003 you need TLS on a Windows 2003 Server

Best Practice

  • Deploy and activate a Server that is running Terminal Licensing Services.
  • Establish a preferred Windows 2000 Terminal Services License Server 
    KB239107 or see KB279561 for Windows 2003
  • Make sure you have the latest HotFixes or service packs applied to ALL Server (Terminal Server, Terminal Licensing Service Server). Therefore see Windows 2000 Terminal Services Licensing Hotfix,  KB287687 and KB294655 
  • Make sure users have write access on the Workstation registry hive:

Known Support Forum issues

  • Windows XP Clients Cannot Connect to a Windows 2000 Terminal Services Server
  • Connecting to a MetaFrame XP Server Shows a Popup Window Indicating initializing. The Window Then Disappears.
  • Network or dialup problems are preventing connection to MetaFrame server
  • "Network or Dialup Problems Are Preventing Communication with the Citrix Server" Error Message When You Connect to Citrix MetaFrame.

Image WebLinks

Loopback Processing of Group Policy

Group Policy applies to the user or computer in a manner that depends on where both the user and the computer objects are located in Active Directory. However, in some cases, users may need policy applied to them based on the location of the computer object alone. You can use the Group Policy loopback feature to apply Group Policy Objects (GPOs) that depend only on which computer the user logs on to.

In a nutshell setup

  • Create a new OU only for the Citrix Servers and move all Server objects into the new OU
  • Add the Citrix Users to the OU Group Policy and deny the GPO for Administrator
  • Enable GPO Loopback Processing and set it to "Replace Mode"

Known Support Forum issues

  • User Policies Are Not Applied When You Log On to a Computer That Is Running Windows 2000 SP4
  • Programs Can Revert to the Default Settings on Terminal Server

Image WebLinks

  • Loopback Processing of Group Policy
  • Troubleshooting Group Policy Application Problems
  • How to Apply Group Policy Objects to Terminal Services Servers
  • How To Optimize Group Policy for Logon Performance in Windows 2000
  • Group Policy is a key Active Directory technology that enables you to efficiently configure and manage computers and users.
    Technet Group Policy Page 
  • Core Group Policy Technical Reference
    Group Policy Tools and Settings 

Slow Logon / Logoff

The Logon- and Logoff time can be between a few seconds and up to more than 20 minutes. There can be various reasons for this and you have to start troubleshooting the issue. First things you should do:

  • Check the Profile size and the amount of small files like Cookies, Favorites, Temp. Internet Files.
  • Remove 3rd Party Printer Driver and minimize the use of client mappings. For a testrun disable ALL client mappings
  • Enable user environment debug logging and see in detail what happen during the logon/logoff.

Known Support Forum issues

  • A "CheckXForestLogon: policy set to disable XForest check..."
  • You may experience a 20-second delay when you try to access a redirected folder by logging on to a Windows Server 2003 Service Pack 1-based computer
  • A Citrix session may respond very slowly when you log on to the session from a Windows XP-based computer
  • It takes longer than you expect to log off from a Terminal Services session in Windows 2000 or Windows 2003
  • Very Long Logon Time When You Try to Connect to Citrix MetaFrame or Citrix 1.8
  • TS on NT will take extremely long time to Autocreate printers with Citrix
    Novell TDI 10062237 
  • Terminal Server and connected Terminal Services clients pause when a Terminal Services client logs on or logs off
  • You are unexpectedly logged off when you try to connect to a computer that is running Windows Server 2003 or Windows XP
  • A remote desktop session may experience a long delay when you try to log off with the Advanced SMS Client installed.
  • Unable to Connect with ICA After Installing Microsoft Rollup 1 for Windows 2000
    As a workaround you can import the following regfile Sp4rufix.reg to disable the smartCard hook (if you don't need it). After the import you have to reboot the server.

Image WebLinks

  • Troubleshooting Slow Logons
  • Programs Start Slowly or Slow Logon if the Network Connection to Your Home Folder Is Slow
  • The Logon Process Hangs At "Running logon scripts..."


The headless (no visible window) application leverages session sharing so that when users launch real applications they immediately appear to open and therefore the time to establish an ICA connection is eliminated.

Use this headless application to establish automatically a ICA connection with single-sign-on when a user logs into their Workstation or Web Interface. The App disconnects after 5 min. if there is no ICA traffic. The program is from Citrix iForum 2005 session 2108.


User Profile Hive Cleanup Service, UPHClean

UPHClean is a Microsoft service that once and for all gets rid of problems with user profile not unloading. Many system and service processes do work on behalf of users and when the work is done the system or service process is responsible for releasing handles it has to the user profile hive.  If this is not done by the service as the user logs off the profile cannot be unloaded.

Known Support Forum issues

  • Changes to your roaming user profile are not saved when you log off and then log on to a Windows Server 2003-based computer
  • Vmware issue, Windows Guest Cannot Update HGFS.DAT
  • Sun Java hsperfdata_ directory incl. files will sometimes not be deleted

Image WebLinks

  • User Profile Hive Cleanup Service, A service to help with slow log off and unreconciled profile problems.
    Microsoft UPHClean Page
  • Download User Profile Hive Cleanup Service Now!
  • Troubleshooting Userenv Event ID 1000 and Profile Issues in a Citrix Environment

Delete Cached Copies of Roaming Profiles

Deleting the cached copies is simple to solve but overlooked many times. To make absolute sure the Profile will be deleted use also UPHClean and the Windows Resource Kit utility Delprof in a (reboot) script.

Image WebLinks

  • How to Automatically Delete Locally Cached Profiles
  • Using Group Policy to Delete Cached Copies of Roaming Profiles
  • How To Delete User Profiles by Using the User Profile Deletion Utility (Delprof.exe) in Windows 2000
  • Delprof.exe is a command-line utility that you can use to delete user profiles on a local or remote computers running Windows 2000, Windows XP, and Windows Server 2003
    User Profile Deletion Utility (Delprof.exe) 
  • User profiles are not removed after you log off a terminal server that is running Windows Server 2003
  • The Winlogon.exe system process quits without unloading the user profile when the screen saver starts on a Windows 2000 Terminal Server at the same time that you log off from a Terminal Services session
  • Roaming profiles are not unloaded on a Windows Server 2003-based computer that is running Terminal Services

Publish Application remains active after logoff

Some published applications may not exit properly. This can happen for example when an application may have an open registry key or there could be a problem with a Citrix function such as Wfshell.
So it's mainly ONE application or process that stops the logoff from the Server and to troubleshoot this issue, the "bad" process has to be found. Before you do this, you should know that the min. processes that a session needs are winlogon.exe, csrss.exe and explorer.exe

Typically suspects are:
Proquota.exe, cwbprovd.exe, Ctfmon.exe, Sxplog32.exe, Wisptis.exe, Ntvdm.exe, Ssonsvr.exe, Ssoshell.exe, Ssobho.exe, Ssomho.exe and the Microsoft SMS Client.

How to find the "bad" process

  • Open the session properties of the remained session in the CMC
  • Terminate the still running processes step-by-step and wait for a graceful logoff
  • Notice the process that loggs the session off. Lets say it's "BadApp.exe"
  • Do you really need BadApp.exe? If not, then remove or uninstall the Application.
  • If you need the program, then add the following registry key
    LogoffCheckSysModules REG_SZ = BadApp.exe


Known Support Forum issues

  • Active Session Left After Logging Off the Session When Microsoft Office XP or Microsoft Office 2003 is Installed on Citrix Presentation Server
  • A Terminal Services session to a Windows 2000-based computer stops responding if a user logs off after the user quits a 16-bit Windows program (Ntvdm.exe)
  • Active Session Left After Logging Off the Session When Microsoft Office XP or Microsoft Office 2003 is Installed on Citrix Presentation Server
  • Session Stays in Active State After User Logs Off
  • PS 4.0 issue, If the Language bar of IME 2002 or IME 2003 was running within an ICA session, the session remained active.
    CTX106910 - Hotfix PSE400W2K3005
  • Session Stays in Active State After User Logs Off

Image WebLinks

  • Graceful Logoff from a Published Application Keeps Sessions in Active State
  • How to Troubleshoot Application Integration Issues
  • Terminal Server Application Integration Information

Troubleshooting logon- and logoff issues

The troubleshooting depends on the issue you have with the Logon or the Logoff process. Enabling the user environment debug logging gives you a really good few of what happen during the Logon/Logoff.
There are also some HotFixes from Microsoft, Citrix and Novell for this problem, so make sure you check them.

For permission issues use the Sysinternals utilities Filemon and Regmon and use the Process Explorer to see open handels and to find for infos about running processes

Image WebLinks

  • How to enable user environment debug logging in retail builds of Windows
  • Troubleshooting Change and Configuration Management
    Windows 2000 Resource Kit 
  • Profiles Fail to Create
  • User Cannot Create a Terminal Server Roaming Profile Path If a User with the Same Name Has Logged On from Another Domain
  • Terminal Server Profile Path Is Ignored If the User Who Is Logging On Does Not Have Query Information Permissions on the RDP-TCP Connection
  • "%" character in Terminal Services profile path appears as a numeric string when you use the TSPROF command in Windows Server 2003

Troubleshooting utilities

Best Practice

Now here is my advice for a best practice setup to reduce problems with the logon- and logoff behaviour.

  • Enable Folder Redirection and redirect as many Profile folders as you can. Use AD GPO's but they are limited to only some folders. You can also use logon scripts for redirecting Profile folders. Remember that the file share for the redirected folders should be high available (cluster solution).
  • Use the free FlexProfileKit to further minimize the Profile size, to make it more robust (mandatory profile) and more flexible because you can decide what registry keys are saved and reapplied. The FlexProfileKit is also the best solution for a profile migration.
  • Remove 3rd. party printer drivers and use only drivers that comes with the original Windows CD. Use printer mappings that you can find at
    If you install a 3rd. party printer driver, at least don't use a PCL6 driver.
  • Delete automatically cached copy's of the roaming profile from the Server.
  • Install Microsoft's UPHClean Service on every terminal services Server also on Windows 2003 Servers.
  • Check Citrix, Microsoft and Novell's Knowledge Base for HotFixes that are related to logon- or logoff issues.


  • Disable the client update database, if you don't use this feature.
  • Add the path to the server fonts folder into the servers path variable.
  • Use the windows resource kit utility delprof.exe in a server startup script.
  • If you don't use audio, delete ALL *.wav files from the servers

Image WebLinks

  • Use FlexProfileKit to have much less problems with Profiles. 
  • User Data and Settings Management, Folder Redirection
    Management Service 
  • Folder Redirection feature in Windows
  • Registry Settings for Folder Redirection in Windows

find or follow me @