Windows cannot load the file

Error occurs during desktop setup and desktop location is unavailable when you log on to Windows for the first time

This article provides help to solve an issue where profile loading fails when the ntuser.dat or usrclass.dat file is defined as read-only, or the profile user lacks the appropriate permissions for these two .dat files.

Original product version: В Windows 10 — all editions, Windows Server 2012 R2
Original KB number: В 3048895

Symptoms

Profiles don’t load when users log on to a computer for the first time. Or, you log on to a computer where policy deletes the cached profile after a date interval when you log off.

Logons that use mandatory user profiles or Virtual Desktop Infrastructure (VDI) may also be affected.

Profiles don’t load when users log on by using cached user profiles.

Services don’t start because of profile load failures. Affected services include but aren’t limited to the following:

When this issue occurs, related events are logged. See the events that are logged in Event Viewer.

Process Monitor may indicate that a CreateFile operation fails with an ACCESS DENIED result to the following path, depending on how file access is constrained: :\documents & settings\ \local settings\Application Data\Microsoft\Windows\UsrClasss.dat.

The screenshot of Process Monitor can be seen here:

Cause

Update 3021674 adds checks for access to the Ntuser.dat and the Usrclass.dat files.

Resolution

To resolve this issue, follow these steps:

Check whether the READ ONLY flag is set on the NTUSER.DAT or USERCLASS.DAT file for the profile that fails to load.

New user profiles are derived from C:\users\default\ during first-time account logons. If profiles fail to load with signatures that match those that are described in the «Symptoms» section, check whether the Read-Only bit is enabled on the NTUSER.DAT and USRCLASS.DAT files in the profile directory for the users or service accounts in question.

NTUSER.DAT in Windows Vista and later versions of Windows is located in C:\users\default\ntuser.dat. Earlier operating systems have other paths, such as C:\Documents and Settings\ \ntuser.dat.

The USRCLASS.DAT file is typically located along a path like C:\Documents and Settings \Local Settings\Application Data\Microsoft\Windows\UsrClass.dat or C:\Users \AppData\Local\Microsoft\Windows.

In Windows Explorer, right-click the NTUSER.DAT or USRCLASS file for the relevant default user or cached user profile. The Read-only check box should be cleared. It this check box is selected, it will cause profile load failures.

Check the NTFS File System permissions setting on the NTUSER.DAT or USERCLASS.DAT file in the cached profile directory that fails to load.

In the following screenshot, the test user, CONTOSO/testUser, has full control over NTUSER.DAT (not shown) and USRCLASS.DAT. Everyone isn’t listed in the ACL Editor group.

Читайте также:  Удалена служба сервер windows
NTFS File System ACLS on DAT files Advanced NTFS File System ACLS on DAT files

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More information

Events that are logged in Event Viewer

Log Name Event sender Event ID Event message text
Application Microsoft-Windows-User Profiles Service 1542 Windows cannot load classes registry file.
DETAIL — Unspecified error
Die Klassenregistrierungsdatei kann nicht geladen werden.
DETAIL — Unbekannter Fehler
Application Service Control Manager 7005 The LoadUserProfile call failed with the following error:
The system cannot find the file specified.
Application Service Control Manager 7024 The SQL Server (MSSQLSERVER) service terminated with service-specific error 2148081668 (0x80092004).
Application Userenv 1500 Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly. If this problem persists, contact your network administrator. DETAIL — The system cannot find the file specified.
Application Userenv 1502 Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a corrupt local profile. If this problem persists, contact your network administrator.

Details of the failure that are displayed in Process Monitor

ProMon detailsThe following message is displayed in Process Monitor:

Desired Access: Generic Read/Write, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: H, ShareMode: Read, Write, AllocationSize: n/a, Impersonating:

The following screenshot shows the Process Monitor details:

Windows cannot load classes registry file

The other day my computer got stuck on the «Shutting down. » screen so I ended up shutting it down by force, something which I have grown to regret. On bootup, a whole bunch of extremely weird things started happening which led me to restore from an earlier date and led me to where I am now. My error/»Details» is almost a perfect replication of:
http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/event-id-1542-user-profile-service-and-missing/d7df458e-f8f7-4e2f-bd65-16b9ceeb5631?auth=1

I’m getting a BUNCH of errors in Windows Event Viewer all complaining that Windows couldn’t load classes registry file. In the registry, there is no entry in the hivelist for the current user classes.

However, symptoms include the wallpaper not loading, not being able to bring up the Start Menu, etc. I believe I have really brought it down to the user profile not getting fully loaded correctly. However, the fix is not entirely clear, since all guides that I’ve found were for Windows 7 or before, and the fixes did not appear to work on my Windows 10 box. I would prefer to be able to fix the user account currently in place as opposed to creating a new main user account.

As a note, if I create a new account and log into that one, the Start Menu/Wallpaper work just fine, it’s just my main account that’s broken.

One issue that is universal across the whole board is that I cannot directly click and run items from the Start Menu on the «working» user accounts. I can right click, and run as an administrator or open file location though.

Как устранить “the file autorun dll could not be loaded or is corrupt error code 0x7e” во время установки Windows?

Некоторые пользователи при попытке установить на свой компьютер операционную систему Windows сталкиваются с данной ошибкой. Если ее перевести на русский язык, то звучит она так: файл autorun dll не может быть загружен или поврежден код ошибки 0x7e.

В данной статье мы разберемся почему появляется данная ошибка и как ее устранить чтобы успешно переустановить систему.

Почему она появляется?

С данной ошибкой сталкиваются те, кто скачал установочный образ Windows из интернета или скопировал с другого установочного диска и просто поместил все содержимое на флешку или на диск, предварительно распаковав.

Далее прямо в работающей системе запускается файл setup.exe, после чего появляется известная ошибка “the file autorun dll could not be loaded or is corrupt error code 0x7e”.

Появление ошибки при запуске файла setup прямо из Windows

Все дело в том, что установочный диск или флешка записывается несколько иным способом. Для успешной установки Windows они должны быть загрузочными, то есть подготовленными для установки с них операционной системы.

Имея установочный образ Windows не достаточно его просто записать на флешку. Для этого существуют специальные программы, которые запишут его правильным образом. Об этом мы уже писали:

Как исправить ошибку?

Для этого сначала нужно по одной из инструкций выше записать диск или флешку. После того, как установочный носитель будет готов, лучше всего произвести установку системы, запуская ее не из под Windows, а из под BIOS.

Для этого нужно лишь установить в BIOS на первое место загрузки DVD ROM или вашу флешку, в зависимости от того, откуда вы будете ставить систему.

Выбор первичного загрузочного устройства

Выводы

Для успешного устранения ошибки “the file autorun dll could not be loaded or is corrupt error code 0x7e” достаточно выполнить всего два условия:

  1. С помощью специальной программы записать скачанный образ Windows на диск или флешку.
  2. Запустить установку не из под Windows, а из под BIOS.

Could not load file or assembly The system cannot find the file specified

I am building a dll, which references a second dll. I have added the second dll as a reference in the first dll’s project by going to Properties > Common Properties > Framework and References > Add New Reference > Browse

I compiled the second dll from a third party’s source code. Both projects are C++/CLI. Whenever my main application tries to call a function in the first dll which contains a call to the second dll, I get the following error:

An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in Unknown Module.

Additional information: Could not load file or assembly ‘NBIS, Version=1.0.5156.29834, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.

I have a copy of the second dll in the same directory as my main exe, and I’ve even tried keeping a copy next to the first dll as well, to no avail.

The second dll references several static libraries, but the only Assembly References it contains are

All of which I have added as assembly references in the first dll.

What can I do to get my application to find and load the second dll?

5 Answers 5

As pointed out in the comments, SysInternals’ Process Monitor is a valuable tool to diagnose DLL resolution problems. Tells you when a 3rd party DLL has a dependency you don’t know about, also tells you when Windows is looking in the wrong corner of your hard drive for the file or finds the wrong one.

Loader snaps is the built-in diagnostic tool for Windows. But Process Monitor is far more convenient.

It does generate rather a lot of information, start from the bottom of the trace or enable tracing at just the right time. You often need to use its filtering tools to turn the firehose in a relevant trickle. Worth the hour of your time to figure it out, this tool belongs on any programmer’s black belt.

Right click on the project you created the dll and the new referencing project, then select properties. Under Application, check the target framework and verify that both have the same framework, some dll projects tend to select ‘client profile’ version of the framework by default, which tend to give the error you are having now..

Let me know if this is not the issue..

My PowerShell ISE wasn’t running as an Administrator. This seemed to be the problem for me.

Please Change your application pool setting.
Keep the steps:

  1. IIS manager open
  2. Click ‘Application pools’ (Application pools list)
  3. Select your application pool
  4. Right click your application pool and select ‘Advanced settings ‘
  5. Change ‘Enable 32-bit application’ from false to true. (When you create application pool Enable 32-bit application default assign false)

For the alert error («The system cannot find the file specified.»)

Right click on [Solution Program name] then select Build Dependencies> & left click on Build Customizations. then true-checkbox then click OK button.

Right click on [Solution Program name] then left click on Properties, left click on «Linker» form «Linker» choose «Debugging» left click on «Debugging» from «Debugging» choose «Debugging Assembly» & convert the value of «Debugging Assembly» to «Yes (/ASSEMBLYDEBUG)», form «Linker» choose «System» left click on «System» from «System» choose «SubSystem» & convert the value of «SubSystem» to «Windows (/SUBSYSTEM:WINDOWS)»,, left click on OK button.

Windows cannot load the file

Вопрос

Our network consists of two Servers a Windows 2011 SBS Server and a Windows 2008 R2 Standard server which is used as an RDP Server.

Existing users are working okay but any new users I create that log onto the RDP Server do not get their folders redirected and when I look in the Event Viewer I see messages to say:

Windows cannot load classes registry file.
DETAIL — The system cannot find the file specified. Event ID 1542

Failed to apply policy and redirect folder «Documents» to «\\mbjserver\UserShares\Jonathan\».
Redirection options=0x1001.
The following error occurred: «Failed to get folder redirection capabilities».
Error details: «The system cannot find the file specified.

I have also run the Group Policy Results wizard to see if it is working from there but I see this message:

Additional information may have been logged. Review the Policy Events tab in the console or the application event log for events between 18/04/2018 08:20:00 and 18/04/2018 08:20:00.

When I look in the registry on the RDP Server the _classes key is missing for the new users:

Has anyone got a solution? I have lost count of how many posts I have read so far.

Читайте также:  Windows path variable command
Оцените статью