Quick answer
QuickBooks error 1402 means the Windows Installer cannot open a registry key it must write to, usually because permissions or ownership on that key are wrong. Create a restore point, back up your company files, export the key, then reset ownership and permissions on the exact key named in the message. Never delete registry keys to clear this error.
What error 1402 actually means
Error 1402 is a Windows Installer permission error. During installation or repair, the installer writes registry records that describe every file it places on the computer. If it cannot open one of those keys, setup stops and shows:
Error 1402. Could not open key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\... Verify that you have sufficient access to that key, or contact your support personnel.
The path in your dialog identifies the exact key whose security settings deny the installer access. The Installer\UserData branch is the most common location, though the message can name other keys depending on the component being written. QuickBooks needs this access because a desktop install writes program paths, licensing records, and shared component registrations.
| What the dialog says | What it usually means | Start with |
|---|---|---|
| Error 1402. Could not open key | The Windows account or SYSTEM lacks access to the named key | Step 4 |
| Error 1401. Setup cannot create registry key | The parent key exists but cannot be written to | Step 4 |
| Error 1406. Setup cannot write the value | Access is granted but a security product blocks the write | Step 6 |
Symptoms that come with error 1402
- The QuickBooks installer, updater, or uninstaller stops partway and points at a long registry path.
- Clicking Retry produces the same error immediately; the installation then rolls back.
- The failure repeats on every QuickBooks update, and sometimes on other installers, because the damaged key is shared Windows Installer data.
- Programs and Features may show QuickBooks as partially installed, or the entry may disappear after the rollback.
- Security software or a registry cleaner was run shortly before the error first appeared.
Common causes, ranked by how often they appear
- Broken permissions or ownership on the key named in the message. The key is owned by a deleted account, or its access list no longer includes SYSTEM and Administrators.
- A registry cleaner or "optimizer" damaged the key. Tools that rewrite ownership and permissions across the registry frequently leave installer keys inaccessible.
- Security software that monitors registry writes. Endpoint protection and some antivirus products block the installer's write attempts and surface the block as error 1402.
- A leftover failed installation. A previous install that crashed mid-write leaves records that the next install cannot update.
- The Windows Installer service is stopped or unhealthy. When the service cannot run properly, installer transactions fail with registry errors.
Before you begin: back up first
Create a restore point and export the key before any permission change. Registry edits are reversible only if you prepare the rollback first. Do not edit any key other than the exact one named in the error, and never delete a key to "reset" it. Deleting installer keys can break every installed program, not just QuickBooks.
- Back up your company files. In QuickBooks, use File → Back Up Company → Create Local Backup, and copy the backup somewhere off the machine. Installation repairs should not touch data, but the backup is your safety net.
- Create a restore point. Open the Start menu, search for Create a restore point, open the System Protection tab, and select Create. Microsoft documents that System Restore returns system files and registry settings to the captured state.
- Export the key named in the error. You will do this in Step 4, immediately before changing anything. Save the
.regfile to a USB drive, not just the desktop. - Sign in with an administrator account and note the full registry path exactly as displayed.
- Allow 30 to 90 minutes and have your QuickBooks license number and product code available in case a repair turns into a reinstall.
How to fix QuickBooks error 1402
Close QuickBooks and restart the Windows Installer service
End any QBW32.exe, QBDBMgrN.exe, and QBUpdate.exe processes in Task Manager, opened with Ctrl + Shift + Esc. Then open services.msc from the Start menu search, find Windows Installer, and if its status is not Running, start it.
If the service is running but the installer still fails, restart it from an elevated Command Prompt: net stop msiserver followed by net start msiserver. A stuck installer transaction is a surprisingly common component of this error.
Run the QuickBooks Install Diagnostic Tool
Install the current QuickBooks Tool Hub, open it, and choose Installation Issues. Run QuickBooks Install Diagnostic Tool and let it complete; it can take up to 20 minutes and repairs the Microsoft components the installer relies on. Restart Windows when it finishes. If the error disappears, verify with the checklist below. The QuickBooks Tool Hub guide explains each tool in the hub.
Repair the QuickBooks installation through Windows Installer
Open Settings → Apps → Installed apps, find your QuickBooks Desktop version, open its options menu, and select Modify. Choose Repair and let Windows Installer re-register the program's files and registry entries.
On older Windows versions, use Control Panel → Programs → Programs and Features, select QuickBooks, and choose Repair from the Uninstall/Change screen. If the repair hits the same 1402 dialog, continue to Step 4.
Export the failing registry key before you change anything
Open Registry Editor as an administrator: open the Start menu, type regedit, right-click the result, and choose Run as administrator. Navigate to the exact path shown in the error dialog. In most reports it begins HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components, followed by a component ID specific to your machine.
Right-click the key named in the message, select File → Export, and save the .reg file to a USB drive or another drive. This export is how you undo a permission mistake. Microsoft's registry backup and restore article documents the same File → Export and Import workflow.
Reset ownership and permissions on that one key
Registry edits can make Windows unbootable if they are applied to the wrong key. Work only on the key named in the error message, with the exported backup saved off the machine. Do not delete keys, do not apply changes to HKEY_LOCAL_MACHINE as a whole, and do not use bulk permission-repair scripts.
Right-click the key, choose Permissions, then Advanced. On the Owner line, select Change, type Administrators, click Check Names, and select OK. Turn on Replace owner on subcontainers and objects and apply. Only the key named in the error should receive this change.
Back on the Permissions tab, add SYSTEM and Administrators if missing, and give each Full Control with Allow. Turn on Replace all child object permissions with inheritable permissions from this object, then apply. Microsoft's guidance is to grant Full Control on the key listed in the message; limiting that grant to SYSTEM and Administrators is safer.
Check antivirus and security software
If the error returns on the key you just repaired, or names a different key each attempt, security software is blocking the installer. Add the QuickBooks program folder and installer file to your antivirus exclusions using the vendor's documented method.
Do not disable protection permanently. If you cannot add exclusions, install QuickBooks in Selective Startup, which loads only Microsoft services. Intuit lists Selective Startup as the workaround for installers blocked by antivirus and antispyware.
Use the Clean Install Tool instead of repeating the repair
If the same key fails after a permission reset, stop editing the registry. Repeated repairs on inconsistent installer data make things worse. The safer route is a clean reinstall: remove QuickBooks, rename the old program folders so Windows Installer starts fresh, and install again.
Open the QuickBooks Tool Hub, go to Installation Issues, and select Clean Install Tool. Choose your QuickBooks version and let it rename the existing folders, then run the installer you downloaded from Intuit as an administrator. Intuit's reinstall article documents the manual version, and the QuickBooks Clean Install Tool guide explains which folders are renamed, none of which hold company files.
Restore the exported key only if something goes wrong
If a permission change makes QuickBooks or another program behave worse, double-click the .reg file you exported in Step 4, or use File → Import in Registry Editor. Then apply the restore point from Before you begin to roll back the broader system state. This is your undo button, not part of the normal fix; the clean reinstall in Step 7 resolves the error without it.
Verify the fix
- Install or repair QuickBooks and confirm setup completes without the 1402 dialog.
- Open QuickBooks Desktop with your normal account and open the company file. Press F2 and confirm the product version and license details appear.
- Run File → Utilities → Verify Data to confirm the company file is healthy and untouched.
- Run a QuickBooks update to the current release; updates exercise the installer path that produced the error.
- Install one other Windows program to confirm the repaired installer keys work beyond QuickBooks. If that also fails, the problem is Windows-wide and belongs with an IT professional.
If error 1402 persists
When 1402 survives a clean reinstall with security exclusions in place, the damage reaches deeper into the Windows Installer database than a single key. Stop editing permissions, and do not use a "registry repair" utility; both risk other installed programs. Contact Microsoft support or an IT professional about repairing the Windows Installer component, and keep the .reg exports for the technician.
If QuickBooks itself will not complete a repair or uninstall, the errors often travel together with other setup codes. Compare your message against the error 1603 install failure and the broader installation failure checklist before you escalate, so you can tell support exactly which stage fails.
Prevention
- Never run registry cleaners. They change ownership and permission records that Windows Installer depends on.
- Add QuickBooks and the Intuit folders to your security software's exception list before installing or updating.
- Install and update QuickBooks from an administrator account, and let each installer finish without forcing a restart.
- Keep a restore point before every QuickBooks version upgrade, and back up company files on a schedule.
Frequently asked questions
Can I just delete the registry key to fix error 1402?
No. Deleting Windows Installer keys can break update and uninstall records for many installed programs, not only QuickBooks. Repair ownership and permissions on the named key instead, or do a clean reinstall that rebuilds the QuickBooks entries.
Will System Restore undo the permission changes?
A restore point captures system files and registry settings, so it can roll back unwanted permission changes made after it was created. Treat it as a second layer of protection: export the specific key too, because the export restores precisely that key even if System Restore is unavailable.
Does error 1402 affect QuickBooks Online?
No. QuickBooks Online runs in a browser and has no local installer and no registry footprint, so it cannot produce error 1402. If the message appears on a computer you use for QuickBooks Online, it comes from a QuickBooks Desktop installation, an update, or a different Windows program on that machine.
Why does error 1402 come back after I fix the key?
A recurrence on the same or a new key usually means security software is resetting permissions or blocking writes. Add exclusions for the QuickBooks folders and installer, then repair again. If it still returns, use the clean install route instead of editing more keys.