You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MSI安装成功但未部署Windows服务,事件日志存在MsiExec错误

Troubleshooting MSI Service Installation Failures on Windows Server 2016 x64

Hey there, let's break down why your MSI is reporting success but failing to install those two Windows services—especially since it's worked hundreds of times before. Here are actionable steps to diagnose and fix the issue:

  • Generate a detailed MSI installation log
    The default success message doesn't tell the whole story. Run your installer with verbose logging enabled to capture every step of the process:

    msiexec /i YourInstaller.msi /l*v full_install.log
    

    Look for entries related to your service installation custom actions—you'll likely see clues like failed registry writes, missing dependencies, or permission errors that weren't surfaced in the UI.

  • Verify custom action execution context
    Most MSIs use custom actions to call installutil.exe for service registration. If this action runs in the wrong context (e.g., user-level instead of system-level), it won't have the permissions needed to create services. Check your MSI's custom action settings:

    • Ensure it's scheduled in the InstallExecuteSequence (not InstallUISequence)
    • Set the action to run in Deferred mode with the NoImpersonate property enabled—this forces it to run under the system account, which has the required privileges.
  • Check 64-bit compatibility
    Even on a 64-bit server, a 32-bit MSI might be calling the 32-bit version of installutil.exe (from C:\Windows\Microsoft.NET\Framework\), which can hit registry redirection issues. Confirm:

    • If your MSI is marked as x86, update the custom action to point to the 64-bit installutil.exe at C:\Windows\Microsoft.NET\Framework64\v[Your.NETVersion]\InstallUtil.exe
    • Alternatively, rebuild your MSI as a 64-bit package if your services are compiled for x64.
  • Dig into the event log errors
    You mentioned finding errors in the event log—even partial details can be critical. Common red flags include:

    • "Custom action [ActionName] failed" with exit code 1603 (general failure)
    • Permission denied errors when writing to HKLM\System\CurrentControlSet\Services
    • File not found errors for your service executable or dependent DLLs
  • Validate service dependencies
    When you install manually with installutil, your local environment might have missing dependencies that the MSI isn't deploying. Compare the output of your manual installutil run to the MSI log—look for warnings about missing assemblies that the MSI failed to install alongside your services.

  • Reset Windows Installer components
    Rarely, corruption in the Windows Installer service can cause silent failures. Try:

    1. Restart the Windows Installer service (run services.msc, find "Windows Installer", restart it)
    2. Run sfc /scannow to repair any corrupted system files related to Windows Installer

If you can share the specific event log errors or key snippets from the verbose MSI log, we can narrow this down even further!

内容的提问来源于stack exchange,提问作者rgeorg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 08:28:06