Wix setup project's exe "app can't run on your PC"
Asked Answered
W

1

10

In VS2012, I've created an Wix3.6 setup project for an application. The installer output type is set to Executable Package (.exe) on the Properties tab. The setup project compiles and produces an .exe as expected.

Double-clicking the .exe produces the message:

This app can't run on your PC.

Executing the .exe as Administrator and granting elevation, the machine says:

Windows cannot find 'C:\abc\xyz.exe'. Make sure you typed the name correctly, and then try again.

Googling reveals the error message is likely architecture related.

Facts:

  • Machine is Windows 8, 64-bit.
  • The setup project is set to an x86 platform.
  • The same setup project produces a working x86 .msi

Any ideas about incorrect settings, references or configurations to look for?

Whatever answered 1/2, 2013 at 0:23 Comment(6)
where on the machine does the application reside..? also can you run the .exe within VS2012.. in debug or run mode..? can you locate the .exe file manually using windows explorer..? looking at your last line I see you mentioned that the same .msi works as x86 application, sounds like a compatibility issue have you looked at how to create a .msi for 64bit OS / Platform..? are there any .config file settings that need to inform the installer that it's not a win32 application vs a win64 bit application.?Ruprecht
It's not on C:\, it's on another partition. I can't run the .exe from VS2012 - there is no debug option. I manually locate the .exe file to run it. I've tried creating a 64-bit msi, but I was unable to get it to work by changing the configuration platform the installer builds under. I know of nothing that needs to inform the installer about its bitness, no. =/Whatever
have you tired a google search, I found some links doing a search in google C# create msi vs2012Ruprecht
qa.social.msdn.microsoft.com/Forums/en-US/vssetup/thread/…Ruprecht
you can try running it manually like this msiexec YourInstaller.msiRuprecht
Thanks! I'll give those a shot.Whatever
F
12

A bit late but I came across this myself and this is my solution.

Basically, this scenario can be created by trying to change a WIX setup project from 'MSI' output to 'EXE' in the project settings. A WIX setup project can only generate an MSI from it's Product.wxs. A WIX-generated EXE is actually created with a bootstrapper project, containining a Bundle.wxs, which then in turn can bundle your MSI(s) internally into a bootstrapped EXE.

So to solve this change your setup project back to MSI output, then create an additional bootstrap project (with EXE output) and add your build MSI output from the setup project in the "Chained packages" section of the Bundle XML.

Foskett answered 16/1, 2015 at 5:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.