The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed

旧城冷巷雨未停 提交于 2020-01-24 19:31:04

问题


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


回答1:


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.
  • Disks: Scan your disk to make sure it has no errors AND that it has space available.
  • 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:

    • https://docs.microsoft.com/en-us/windows/win32/msi/disablemsi
    • https://docs.microsoft.com/en-us/windows/win32/msi/machine-policies
  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.

    • Change.exe: https://ss64.com/nt/change.html

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.

    • https://www.easeus.com/resource/the-windows-installer-service-could-not-be-accessed.html
    • https://docs.microsoft.com/en-us/office/troubleshoot/office/windows-installer-service-not-be-accesse
  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).

    • "Fix Windows Update errors by using the DISM or System Update Readiness tool": https://support.microsoft.com/en-us/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness (do visit this link)
    • Run in sequence:
      • DISM.exe /Online /Cleanup-Image /CheckHealth
      • DISM.exe /Online /Cleanup-image /Restorehealth
    • Reboot.



回答2:


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



来源:https://stackoverflow.com/questions/59696619/the-windows-installer-service-could-not-be-accessed-this-can-occur-if-the-windo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!