Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 1904

MSI 1904 and 1920: Module Failed to Register or Service Failed to Start

11 min read Updated October 5, 2026 Installers, Runtimes & App Deployment

Fix it now

Both errors land after the files are already on disk. Microsoft publishes 1904 as a module that failed to register, with an HRESULT attached, and 1920 as a service that failed to start with a note about privileges. The files are fine; something in the environment is stopping the last step.

Run these in an elevated Command Prompt, not PowerShell – in PowerShell sc is an alias for Set-Content

regsvr32 "C:\Program Files\Vendor\module.dll"
%SystemRoot%\SysWOW64\regsvr32.exe "C:\Program Files (x86)\Vendor\module.dll"
sc.exe qc <servicename>
sc.exe start <servicename>
sc.exe query <servicename>
  1. Note the exact file or service name from the message, plus the HRESULT if there is one.
  2. For 1904, register the module by hand with the tool that matches its architecture. The error regsvr32 reports is far more specific than the one setup showed you.
  3. For 1920, run sc.exe qc first to see the binary path, start type and logon account, then sc.exe start and read what comes back.
  4. Open Event Viewer, go to Windows Logs then System, and read the Service Control Manager entries written at the time of the failure.

If regsvr32 fails with a load error rather than a registration error, the module has an unmet dependency. Install the Visual C++ redistributable the vendor specifies, in the module’s architecture, before trying again.

If the module registers and the service starts, rerun setup and you are done. If not, the next section covers what each of these late actions actually requires.

Why it happens

Copying files is simple. What comes afterwards is not. Self-registration loads a module into a process and calls into it, so every dependency that module needs has to be present and loadable first. Creating and starting a service means the account it runs as must exist, must hold the right to log on as a service, and the executable must run far enough to report back to the Service Control Manager inside its start timeout.

That is why these errors follow a missing runtime so often. A COM server built against a particular C runtime cannot load without it, and the loader failure surfaces as a registration failure rather than as a missing-file message. Architecture compounds it: a 32-bit module registered with the 64-bit tool fails even though both the file and the tool are perfectly healthy.

The rest of the family is more specific than it is usually described. 1905 is the unregister step failing, which you meet during uninstalls and upgrades. 1922 is published as a service that could not be deleted – not reconfigured, which is a case this code does not cover. Its neighbours split the rest: 1921 is a service that could not be stopped and 1923 one that could not be installed. 1931 is different in kind: the installer tried to replace a file Windows protects and was refused, and the message names the package version and the protected version.

The module has an unmet dependency

You have this one if Manual regsvr32 fails with a load error rather than a registration error, and the machine is missing a runtime the vendor lists as a prerequisite.

  1. Install the Visual C++ redistributable the vendor specifies, matching the module’s architecture.
  2. Install any other listed prerequisite, such as a database client or a managed runtime.
  3. Retry the manual registration and confirm it succeeds before rerunning the installer.

Microsoft’s Visual C++ redistributables are free downloads. A missing one is a prerequisite problem, never a licensing one.

The wrong registration tool was used for the module’s architecture

You have this one if A module under Program Files (x86) fails to register while an equivalent 64-bit module registers cleanly.

  1. Register 32-bit modules with %SystemRoot%\SysWOW64\regsvr32.exe.
  2. Register 64-bit modules with %SystemRoot%\System32\regsvr32.exe.
  3. If the installer itself chose wrongly, check whether the vendor ships separate 32-bit and 64-bit packages and use the one matching the application you need.

The service account cannot log on as a service

You have this one if 1920 appears where the package configured its service under a named account rather than a built-in one, and the System log records a logon failure for it.

  1. On Pro, Enterprise, Education or Server, open secpol.msc, expand Local Policies then User Rights Assignment, and add the account to Log on as a service.
  2. On Windows Home there is no secpol.msc and no gpedit.msc. Grant the right with secedit instead: export the local policy with secedit /export /cfg C:\sec.cfg, add the account to SeServiceLogonRight, and reimport with secedit /configure /db secedit.sdb /cfg C:\sec.cfg /areas USER_RIGHTS.
  3. Alternatively configure the service to run under a built-in account such as LocalSystem or NetworkService, which already holds the right.
  4. Confirm the stored password is current on the Log On tab in services.msc, then start the service.

The service starts but does not report ready in time

You have this one if The System log records a timeout rather than a failure, or the service is running by the time you look and the installer had already given up.

  1. Read the Service Control Manager entries in the System log and note whether they describe a failed start, a timeout waiting for the service to connect, or a service-specific error – the three lead in different directions.
  2. Look for something the service needs at start-up: a database it cannot reach, a port already in use, a folder it cannot write to.
  3. If a heavily loaded or slow machine is genuinely the cause, the Service Control Manager’s start timeout is a machine-wide setting that can be raised, but treat that as a workaround while you deal with the slowness.

The installer tried to replace a protected system file

You have this one if 1931, naming a file in a Windows system folder, with a package version and a protected version in the message.

  1. Let the package continue if it offers to skip that file. Windows is protecting the version it ships and the application is expected to use it.
  2. Check whether the vendor has a newer package built for your Windows version, which is the usual reason an older installer tries this.
  3. Do not attempt to force the replacement. Servicing will put the original back, and you risk a system that will not start.

Full reference

How Microsoft words each of these

Number Published message
1904 Module [2] failed to register. HRESULT [3].
1905 Module [2] failed to unregister. HRESULT [3].
1920 Service [2] ([3]) failed to start. Verify that you have sufficient privileges to start system services.
1921 Service [2] ([3]) could not be stopped. Verify that you have sufficient privileges to stop system services.
1922 Service [2] ([3]) could not be deleted. Verify that you have sufficient privileges to remove system services.
1923 Service [2] ([3]) could not be installed. Verify that you have sufficient privileges to install system services.
1931 The Windows Installer service cannot update the system file [2] because the file is protected by Windows. Package version: [3], OS Protected version: [4]

1921, 1922 and 1923 are three different failures and it is worth matching yours exactly. A service that could not be stopped is usually one that is hung or that a dependent service is holding up. One that could not be deleted is usually still running, or still open in Services or Task Manager. One that could not be installed is usually a name collision with an existing service.

Commands for the last stage of an install

Command Purpose
regsvr32 "<path to dll>" Registers a COM server and reports the real HRESULT if it fails
regsvr32 /u "<path to dll>" Unregisters a module, which is what 1905 is about
sc.exe qc <service> Shows the binary path, start type and logon account
sc.exe query <service> Shows the current state and last exit code
sc.exe start <service> Attempts a start and returns the error directly
services.msc Graphical view of the Log On account and recovery settings

Write these as sc.exe. In PowerShell, sc is an alias for Set-Content, so sc start MyService does not start anything – it waits for input or errors. Either use sc.exe or run them from a Command Prompt.

Granting Log on as a service without a policy editor

The usual instruction for 1920 is to open secpol.msc. That tool is not present on Windows Home, and neither is gpedit.msc, so an entire class of machine is left with no route at all. The secedit path works everywhere:

secedit /export /cfg C:\sec.cfg

rem edit C:\sec.cfg and add the account to the SeServiceLogonRight line

secedit /configure /db secedit.sdb /cfg C:\sec.cfg /areas USER_RIGHTS

Edit the exported file with a text editor, find the SeServiceLogonRight entry, and add the account to the end of the comma-separated list. The simpler alternative, where the application allows it, is to run the service under a built-in account that already holds the right.

Registration that works by hand and fails during setup

  • Setup performs it as SYSTEM, not as you. SYSTEM has a different environment, no mapped drives and no access to your profile.
  • A dependency you can reach through a mapped drive or a per-user PATH entry is invisible to SYSTEM.
  • A module that registers cleanly from its final folder may fail from the temporary folder setup used, if it loads a sibling DLL by relative path.
  • If the module registers by hand and the product works, let the install finish and note it; if it does not, the missing dependency is still missing.
  • An endpoint product that blocks writes to the COM class registrations produces the same symptom, and its own log will say so.

Every code this article covers

Code What it points at Source
1904 A module failed to register during installation; the message carries an HRESULT Microsoft Learn
1905 A module failed to unregister during removal or upgrade Microsoft Learn
1920 A service created by the package failed to start, with a note about privileges to start system services Microsoft Learn
1922 A service could not be deleted – not reconfigured; 1921 is could not be stopped and 1923 could not be installed Microsoft Learn
1931 The installer could not update a file protected by Windows; the message names the package version and the protected version Microsoft Learn

Confirm the fix worked

  1. Rerun the installer and confirm it reaches completion without an error at the registration or service stage.
  2. Run sc.exe query <servicename> and confirm the service reports as running.
  3. Reboot and confirm the service starts on its own if it is set to start automatically.
  4. Launch the application and exercise the feature that depends on the registered module.
  5. Check the System log after the reboot and confirm no new Service Control Manager errors were written for that service.

Questions people ask about this

Is there a licence I need to buy here?

No. Both errors are environment problems: a missing free redistributable, a user right, or a service dependency. None of them is resolved by a product key or a paid upgrade.

Can I click Ignore and carry on?

You can finish the install, but a module that never registered means the feature depending on it will not work, and a service that never started means the product may not run at all. Fix the step rather than skipping it.

I am on Windows Home and secpol.msc does not exist. How do I grant Log on as a service?

Use secedit. Export the local policy with secedit /export /cfg C:\sec.cfg, add the account to the SeServiceLogonRight line, and reimport with secedit /configure /db secedit.sdb /cfg C:\sec.cfg /areas USER_RIGHTS. Running the service under a built-in account such as LocalSystem avoids the question entirely.

Why does registration work by hand but fail during setup?

Because setup performs it as SYSTEM rather than as you. SYSTEM has a different environment, no mapped drives and no access to your user profile, so a dependency that is reachable from your session may be invisible to it.

The service starts once and then stops. Is that the same problem?

No. That is the service failing after a successful start, which is an application fault rather than an installer one. Read the application’s own log and the Application event log rather than chasing 1920.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix MSI 1730 and 1925: You Must Be an Administrator to Install or Remove This Free Fix MSI 1310 and 1303: The Installer Cannot Write to the Path It Was Given Free Fix 0x80070141: Microsoft Store Apps Fail to Install or Sit Stuck as Pending Free Fix 0x80073CF6: Package Could Not Be Registered – Fixing MSIX Dependency Errors
โ† Back to Knowledge Base