【问题标题】:Windows Installer IssueWindows 安装程序问题
【发布时间】:2014-04-07 21:22:09
【问题描述】:

我的应用程序的 Windows 安装程序出现问题。安装程序是作为 2010 年的 VS 安装程序安装项目构建的。如果我使用 setup.exe 运行,一切都会运行并安装得很好。如果我通过双击 .msi 或右键单击 > 以管理员身份运行来安装。它因错误消息而爆炸:“32 位进程无法访问 64 位进程的模块。”

当主安装程序尝试运行自定义操作来启动辅助安装程序时,会出现这种情况,该辅助安装程序安装控制台应用程序来管理主应用程序,这是一项 Windows 服务。

我相信 msi 日志的相关部分在这里。任何想法为什么它只适用于 setup.exe?:

Action 14:11:15: CreateShortcuts. Creating shortcuts
MSI (s) (50:28) [14:11:15:125]: Executing op: IconCreate(Icon=_853F67D554F05449430E7E.exe,Data=BinaryData)
CreateShortcuts: Shortcut: _853F67D554F05449430E7E.exe
MSI (s) (50:28) [14:11:15:127]: Executing op: IconCreate(Icon=_00A3DC312983E2DC9634D3.exe,Data=BinaryData)
CreateShortcuts: Shortcut: _00A3DC312983E2DC9634D3.exe
MSI (s) (50:28) [14:11:15:139]: Executing op: SetTargetFolder(Folder=23\DVS\)
MSI (s) (50:28) [14:11:15:140]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI (s) (50:28) [14:11:15:141]: Executing op: ShortcutCreate(Name=ELECTI~1|Election File Manager Console,Feature=DefaultFeature,Component={C67DDC11-E115-04F1-EB37-4CEB5F7673C5}[~]2,,,WorkingDir=C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\,Icon=_00A3DC312983E2DC9634D3.exe,IconIndex=0,,ShowCmd=1,Description=Manages configuration for the Election File Manager.,,,,)
CreateShortcuts: Shortcut: ELECTI~1|Election File Manager Console
MSI (s) (50:28) [14:11:15:146]: Executing op: SetTargetFolder(Folder=23\DVS\)
MSI (s) (50:28) [14:11:15:147]: SHELL32::SHGetFolderPath returned: C:\ProgramData\Microsoft\Windows\Start Menu\Programs
MSI (s) (50:28) [14:11:15:147]: Executing op: ActionStart(Name=_8C068C04_0632_43F6_9A23_7215DFF38AB8.commit,,)
Action 14:11:15: _8C068C04_0632_43F6_9A23_7215DFF38AB8.commit. 
MSI (s) (50:28) [14:11:15:148]: Executing op: CustomActionSchedule(Action=_8C068C04_0632_43F6_9A23_7215DFF38AB8.commit,ActionType=3585,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=commit /LogFile= /TargetDir="C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\ " "C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\DVS.Adjudication.Services.ElectionFileManager.exe" "C:\Users\Admin\AppData\Local\Temp\CFGF135.tmp")
MSI (s) (50:28) [14:11:15:148]: Executing op: ActionStart(Name=_4D62EF4D_0692_4108_9E9F_FB7D6DEB597D.commit,,)
Action 14:11:15: _4D62EF4D_0692_4108_9E9F_FB7D6DEB597D.commit. 
MSI (s) (50:28) [14:11:15:149]: Executing op: CustomActionSchedule(Action=_4D62EF4D_0692_4108_9E9F_FB7D6DEB597D.commit,ActionType=3585,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=commit /LogFile= "C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\DVS.Adjudication.Services.ElectionFileManager.ServiceManager.dll" "C:\Users\Admin\AppData\Local\Temp\CFGF135.tmp")
MSI (s) (50:28) [14:11:15:149]: Executing op: ActionStart(Name=_E1493850_50FB_415B_9B41_D70C965F5F01.rollback,,)
Action 14:11:15: _E1493850_50FB_415B_9B41_D70C965F5F01.rollback. 
MSI (s) (50:28) [14:11:15:149]: Executing op: CustomActionSchedule(Action=_E1493850_50FB_415B_9B41_D70C965F5F01.rollback,ActionType=3329,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=rollback /LogFile= "C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\DVS.Adjudication.Services.ElectionFileManager.ServiceManager.dll" "C:\Users\Admin\AppData\Local\Temp\CFGF135.tmp")
MSI (s) (50:28) [14:11:15:149]: Executing op: ActionStart(Name=_2F4DD30B_44C5_4DA1_8B54_9AB7A78142AB.rollback,,)
Action 14:11:15: _2F4DD30B_44C5_4DA1_8B54_9AB7A78142AB.rollback. 
MSI (s) (50:28) [14:11:15:150]: Executing op: CustomActionSchedule(Action=_2F4DD30B_44C5_4DA1_8B54_9AB7A78142AB.rollback,ActionType=3329,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=rollback /LogFile= /TargetDir="C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\ " "C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\DVS.Adjudication.Services.ElectionFileManager.exe" "C:\Users\Admin\AppData\Local\Temp\CFGF135.tmp")
MSI (s) (50:28) [14:11:15:150]: Executing op: ActionStart(Name=_62AA792B_00B2_4C1E_96E0_04E58249B509.install,,)
Action 14:11:15: _62AA792B_00B2_4C1E_96E0_04E58249B509.install. 
MSI (s) (50:28) [14:11:15:151]: Executing op: CustomActionSchedule(Action=_62AA792B_00B2_4C1E_96E0_04E58249B509.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= /TargetDir="C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\ " "C:\Program Files (x86)\Dominion Voting Systems\Election File Manager\DVS.Adjudication.Services.ElectionFileManager.exe" "C:\Users\Admin\AppData\Local\Temp\CFGF135.tmp")
MSI (s) (50:04) [14:11:15:153]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIF339.tmp, Entrypoint: ManagedInstall
MSI (s) (50:14) [14:11:15:153]: Generating random cookie.
MSI (s) (50:14) [14:11:15:154]: Created Custom Action Server with PID 992 (0x3E0).
MSI (s) (50:B8) [14:11:15:183]: Running as a service.
MSI (s) (50:B8) [14:11:15:185]: Hello, I'm your 32bit Elevated custom action server.
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
Error 1001. Error 1001. An exception occurred in the OnBeforeInstall event handler of DVS.Adjudication.Services.ElectionFileManager.Installation.MainInstaller. --> A 32 bit processes cannot access modules of a 64 bit process.
MSI (s) (50!DC) [14:11:19:482]: 
MSI (s) (50:04) [14:11:19:485]: Leaked MSIHANDLE (50) of type 790531 for thread 2268
MSI (s) (50:04) [14:11:19:485]: Note: 1: 2769 2: _62AA792B_00B2_4C1E_96E0_04E58249B509.install 3: 1 
DEBUG: Error 2769:  Custom Action _62AA792B_00B2_4C1E_96E0_04E58249B509.install did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _62AA792B_00B2_4C1E_96E0_04E58249B509.install, 1, 
CustomAction _62AA792B_00B2_4C1E_96E0_04E58249B509.install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 14:11:19: InstallExecute. Return value 3.
MSI (s) (50:28) [14:11:19:493]: User policy value 'DisableRollback' is 0
MSI (s) (50:28) [14:11:19:493]: Machine policy value 'DisableRollback' is 0
MSI (s) (50:28) [14:11:19:498]: Executing op: Header(Signature=1397708873,Version=500,Timestamp=1149727080,LangId=1033,Platform=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)
MSI (s) (50:28) [14:11:19:498]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (s) (50:28) [14:11:19:499]: Executing op: DialogInfo(Type=1,Argument=Election File Manager)
MSI (s) (50:28) [14:11:19:500]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
Action 14:11:19: Rollback. Rolling back action:

【问题讨论】:

  • 在 32 位而不是 64 位窗口中运行程序时会发生什么?

标签: windows-installer


【解决方案1】:

我不断地向其他与 VS 安装程序有类似问题的人重复此建议。此项目类型已被 Microsoft 弃用,应尽快迁移到 Wix - 它根本不是交付设置的可靠方式。我意识到这是一个见仁见智的问题,但很少有该领域知识的人不同意。鉴于人们使用 VS 安装程序报告的问题数量众多,因此迁移到 Wix 是值得的。

请在此处查看我的回答,并附有帖子的更多链接,其中包含有关如何快速开始使用 Wix 的提示:https://stackoverflow.com/a/22907659/129130

在您的情况下,我会做的是删除所有嵌入式设置并通过通用引导程序应用程序运行它们。 Wix 有自己的版本,称为 Burn。

【讨论】:

  • 这是一个遗留应用程序。同意每个人都应该使用 Wix,我们作为一家公司已经这样做了,但我们仍然需要继续支持我们的旧软件。
  • 使用 dark.exe 可以将现有的 MSI 反编译为 WIX 代码。然后你基本上可以清理代码并增强它。
  • @SteinÅsmul 我认为你没有答案,你的建议必须是评论而不是回答
【解决方案2】:

您的托管代码自定义操作似乎失败了。由于它提到了位不匹配,因此您的托管代码以某种方式进入了尝试调用 64 位代码的调用链。您的托管代码可能是 AnyCpu(或 64 位),而调用它的隐藏 Microsoft Dll 是 32 位并且无法加载您的代码。或者它正在获取您的 32 位代码,并且您试图以某种方式调用 64 位 Dll/程序集。冒着说明明显的风险,不允许跨体系结构的 Dll 调用。

无论如何,如果您构建 Setup.exe 来安装先决条件,这可能无关紧要,这意味着您不能单独运行 MSI,因为它需要 setup.exe 为您安装的先决条件。

【讨论】:

    猜你喜欢
    • 2010-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多