Unable to Load User Profile 登入時無法被正常載入

有時候使用者登入computer後無法載入profile,登入時僅能以臨時profile登入,或是登入後無法顯示桌面

並非每次皆會發生,重新開機幾次可以暫時解決

EventLog

事件類型: 警告
事件來源: Userenv
事件類別目錄: 無
事件識別碼: 1517
日期:  97/6/12
時間:  下午 02:27:05
使用者:  NT AUTHORITYSYSTEM
電腦: S105
描述:
在登出過程中,當應用程式或服務仍在使用登錄時,Windows 已儲存使用者 VGHOPDopdclient 的登錄。使用者登錄所使用的記憶體尚未被釋出。當登錄不再處於使用中狀態時,將會被解除載入。

這通常是因為服務以使用者帳戶執行而造成,請嘗試將服務設定成以 LocalService 或 NetworkService 帳戶執行。

請在 https://go.microsoft.com/fwlink/events.asp 查看說明及支援中心,以取得其他資訊。

事件類型: 警告
事件來源: Userenv
事件類別目錄: 無
事件識別碼: 1524
日期:  97/6/12
時間:  下午 02:27:04
使用者:  S-1-5-21-1240135555-3271779952-1062365482-1143
電腦: S105
描述:
Windows 無法將您的類別登錄檔解除載入 - 有其他應用程式或服務還在使用它。當檔案不在使用中時將會被解除載入。

UserEnv.log

USERENV(2a8.2ac) 17:33:38:921 ExtractProfileFromBackup:  Failed to open key SoftwareMicrosoftWindows NTCurrentVersionProfileListS-1-5-21-1240135555-3271779952-1062365482-1143 with error 2
USERENV(2a8.2ac) 17:33:38:937 ExtractProfileFromBackup:  Profile created from Backup
USERENV(2a8.2ac) 17:33:38:937 PatchNewProfileIfRequred: A profile already exists with the current sid, exitting
USERENV(2a8.2ac) 17:33:38:937 CreateLocalProfileKey:  Not setting additional Security
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  Found entry in profile list for existing local profile
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  Local profile image filename = <%SystemDrive%Documents and SettingsUserName>
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  Expanded local profile image filename = <C:Documents and Settings UserName >
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  No local mandatory profile. Error = 2
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  Found local profile image file ok <C:Documents and Settings UserName ntuser.dat>
USERENV(2a8.2ac) 17:33:38:937 GetExistingLocalProfileImage:  Failed to query low profile unload time with error 2
USERENV(2a8.2ac) 17:33:38:937 Local Existing Profile Image is reachable

這個問題發生的原因有以下可能:

This problem occurs because, when you log on to the computer, the WebDav client service caches a handle to the HKEY_CURRENT_USERSoftwareClasses registry subkey during per-user initialization.
The HKEY_CURRENT_USERSoftwareClasses registry subkey is the Usrclass.dat file in your user profile. The HKEY_CURRENT_USERSoftwareClasses registry subkey is used for per-user COM registrations. Therefore, the HKEY_CURRENT_USERSoftwareClasses registry subkey cannot be unloaded when you log off from the computer because of the cached handle.

解決方法

更新XP SP3或是安裝kb842827

並安裝User Profile Hive Cleanup Service

User Profile Hive Cleanup Service

https://www.microsoft.com/downloads/details.aspx?FamilyId=1B286E6D-8912-4E18-B570-42470E2F3582&displaylang=en

參考資料

842827 The system may not unload your user profile correctly when you log off from a Windows XP-based computer

https://support.microsoft.com/default.aspx?scid=kb;EN-US;842827

944984 The user profile may not be correctly unloaded when you log off from a Windows Server 2003-based computer, and event 1517 is logged

https://support.microsoft.com/default.aspx?scid=kb;EN-US;944984