1

I am having issues with a Windows installer for my application. The installer was built as a VS Installer Setup Project with 2010. If I run using the setup.exe, everything runs and installs fine. If I install by double-clicking the .msi or right-clicking > runs as admin. it blows up with the error message: "A 32 bit processes cannot access modules of a 64 bit process."

It looks like this occurs when the main installer tries to run a custom action to start a secondary installer that installs a console app to manage the main application, which is a Windows service.

I believe the pertinent part of the msi log is here. Any ideas why it only works with the 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:
xav
  • 5,452
  • 7
  • 48
  • 57

2 Answers2

0

It looks like you have a managed code custom action that's failing. Since it mentions a bitness mismatch, your managed code is somehow getting into a calling chain that tries to call 64-bit code. Your managed code might be AnyCpu (or 64-bit) and the hidden Microsoft Dll that's calling it is 32-bit and failing to load your code. Or it's getting to your code that is 32-bit and somehow you're trying to call a 64-bit Dll/assembly. At the risk of stating the obvious, cross architecture Dll calls are not allowed.

Anyway that may be irrelevant if you built the Setup.exe to install prerequisites, which implies that you can't run your MSI on its own because it needs prerequisites that setup.exe is installing for you.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
0

I keep repeating this advice over and over to other people with similar issues with VS installers. This project type is already deprecated by Microsoft and should be migrated to Wix as soon as possible - it is simply not a reliable way to deliver setups. I realize this is a matter of opinion, but very few people with knowledge in the field disagree. With the amount of problems people report using VS installer, migrating to Wix is worth the effort.

Please see my answer here, with further links to a post with tips on how to get quickly started with Wix: https://stackoverflow.com/a/22907659/129130

What I would do in your case is to remove all embedded setups and run them via a common bootstrapper application. Wix has its own version called Burn.

Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • This is a legacy application. Agreed that everyone should move toward using Wix, and we as a company have, but it remains that we need to continue to support our legacy software. – Benjamin Rice Apr 28 '14 at 17:30
  • Using dark.exe you can decompile an existing MSI to WIX code. Then you can basically just clean up the code and enhance it. – Stein Åsmul Apr 28 '14 at 23:27
  • @SteinÅsmul I think you have no answer and your advice must be comment not answer – kroky Sep 05 '16 at 16:52