2

I have an issue when I tried to install an EXE file on windows server 2012 R2. When I tried to execute the EXE or MSI file I got below error, "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance."

I tried the following methods to fix the issue but nothing worked.

Method 1:

I tried to unregister and re-register msiexec file

%windir%\system32\msiexec.exe /unregister

%windir%\system32\msiexec.exe /regserver

%windir%\syswow64\msiexec.exe /unregister

%windir%\syswow64\msiexec.exe /regserver

Method 2

net stop msiserver

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\MSIServer" /VE /T REG_SZ /F /D "Service"

net stop msiserver

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer" /VE /T REG_SZ /F /D "Service"

net start msiserver

Method 3

Browsed the registry editor to locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msiserver. Created following key WOW64 REG_DWORD 0x00000000

I did reboot the servers after each method and even tried to export the registry key from working server to the issue server. Still, the issue is not resolved.

Is there any other solution I can try to fix the issue. I don't want to rebuild the server from the scratch. Please help

Regards, Naresh

Naresh Kumar
  • 155
  • 1
  • 11
  • It is probably something else, but please verify this first: https://docs.microsoft.com/en-us/windows/win32/msi/disablemsi - and maybe have a look here too: https://docs.microsoft.com/en-us/windows/win32/msi/machine-policies - you are running with admin rights when trying to install? Is this a terminal server? Is it in installation mode? – Stein Åsmul Jan 12 '20 at 03:23
  • [My old answer here](https://stackoverflow.com/a/54701744/129130) has a number of broken links, but this one works: https://ss64.com/nt/change.html - will have to have a look at those links and get them updated. – Stein Åsmul Jan 12 '20 at 03:33

2 Answers2

2

Disclaimer: The below is just a list of options intended to list anything and everything. Some of the options I am not sure are that useful, but they are there to remember them for the next time:


UPDATE: Please check the bottom suggestion first: DISM.EXE. This is what worked in this case says the original poster (added after he reported it).


Quick Suggestions:

  • Currupt Setup: I would try a different MSI file to install, in order to make sure the one you test with is not corrupted. Reboot too - if you can (strict on some servers) - to resolve any locks.
  • Disk Errors: Scan your disk to make sure it has no errors AND that it has space available.
  • Disk Space: Lack of disk space can cause a lot more problems than what is taken seriously. It is a serious problem in the age of tiny SSD disks. Try to clean out your system disk in particular.
  • Logs: Check for clues in the event log as to what might be wrong (if anything in particular).
  • Malware: Run a malware scan with whatever tool you have available to do so. Check your setup.exe by uploading it to https://www.virustotal.com/
  • Sfc.exe: Run sfc.exe to scan for system file corruption (see tool described below). You can run sfc.exe directly, if you have no good malware scanner available or it also fails to run.
  • Anti-Virus: Try to disable any malware scanners if you have them running. They could block things (usually for a reason - infection for example), and prevent the installation.
  • Policies: Glance over group policies to verify that nothing there is blocked. See below.
  • Terminal Server: Make sure you are not on a terminal server. If you are, see below.

The Basic Checks: This will be a generic check list of sort, bear with me for including what you have already tried, and some entries that I am frankly not sure are that relevant at all:

  1. Corrupted Installer File: Before trying anything else, try to run a different installer. You could have a corrupted installer file on your hands. This is in fact very common, and can take ages to discover.

  2. Pending Reboot: Is there a pending reboot? Can you reboot the server? Try it. I have seen some Windows Updates blocking installation until the reboot has been done.

  3. Service running: Verify that the Windows Installer service is not disabled in the service control applet. Launch services.msc and check "Windows Installer". Some admins actually go to the lenght of disabling the service! (there goes the day as they say).

  4. Admin Rights / UAC: Verify that you run with an admin account (admin rights), and that the UAC is enabled? (might not be possible to disable on servers, I don't know). I don't maintain servers much, but maybe try to launch something you know needs elevation and verify that you get the UAC prompts.

  5. Policies: Investigate whether the Windows Installer service is disabled by policy:

  6. Terminal Server: If it is a terminal server machine, make sure you are in installation mode and not in execute mode. See this answer.

More Involved (Stranger Shores):

  1. Different Admin User: I always try a different admin account when I have a weird problem (debugging - down the page). Just to rule it out. Sometimes it works - generally when the user profile is broken somehow (broken paths etc...). Try to log in and install as that user.

  2. Malware: Run a scan for malware. With malware anything is possible in terms of problems. Use whatever tool you have. Not sure what Windows Server has - does it have Windows Defender Offline scan mode?

  3. Sfc.exe: Along the same lines run the sfc.exe tool to verify that system files are not corrupted. This tool can be more effective than people think. It looks like it is available on Windows Server machines.

    • sfc /verifyonly (no repair)
    • sfc /scannow (to repair problems)
  4. COM Registration: You have already tried this:

    • %windir%\system32\msiexec.exe /unregister
    • %windir%\system32\msiexec.exe /regserver
    • %windir%\syswow64\msiexec.exe /unregister
    • %windir%\syswow64\msiexec.exe /regserver
  5. Reinstall Windows Installer: This is the last resort if you ask me. Don't try it until everything else has failed. In particular make sure you run sfc.exe first - before considering this hack.

  6. DISM.EXE: Generic way to try to fix Windows corruption issues - also recommended recently to fix the Windows 10 issue in the Windows Explorer search box in the latest 1909 update (Jan 2020).

Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140
  • Thanks Stein. But it did not help to fix the issue. Thanks for your input :) – Naresh Kumar Jan 15 '20 at 12:12
  • Have you been through the whole list and nothing changed anything? What server type is this? – Stein Åsmul Jan 15 '20 at 13:15
  • I see **`DISM.exe`** worked for you - I will update my list. Could be a bigger issue with Windows. – Stein Åsmul Jan 15 '20 at 14:44
  • Had the same issue, none of the solution provided on the web were working. In case anybody else needs that, it turned out that I was missing the following registry entries: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\CLSID\{000C101C-0000-0000-C000-000000000046}] @="Msi install server" "AppId"="{000C101C-0000-0000-C000-000000000046}" – Menion Leah Mar 05 '21 at 13:37
  • Running `%windir%\system32\msiexec.exe /regserver` should sort that out for you I believe (see above and run the unregister first too). AppIds are involved in COM / DCOM. You might have changed COM / DCOM settings on the computer or a package could have done so - or even malware or disk corruption could cause trouble (and many other things). – Stein Åsmul Mar 05 '21 at 13:45
  • https://en.wikipedia.org/wiki/Distributed_Component_Object_Model - *"DCOM: ...[a technology] for communication between software components on networked computers. DCOM extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+ application server infrastructure."* – Stein Åsmul Mar 05 '21 at 14:12
0

I got below steps from Microsoft support engineer and it worked after running below command with a reboot.

DISM.exe /Online /Cleanup-Image /CheckHealth DISM.exe /Online /Cleanup-image /Restorehealth

https://support.microsoft.com/en-us/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness

Naresh Kumar
  • 155
  • 1
  • 11
  • I have seen this recommended to fix issues with the malfunctioning search field in Windows Explorer in Windows 10 1909 edition. There seems to be a lot of subtle errors in recent Windows updates. Updated my answer to include this. – Stein Åsmul Jan 15 '20 at 14:36