Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 854
colbybhearn Avatar asked Feb 01 '13 00:02

colbybhearn


People also ask

How do I install WiX on Windows?

To do this, open the Windows App Store and search for Wix. Once you find Wix, click on the “Get” button and then click on the “Install” button. After Wix is installed, you can launch it by going to Start > All Programs > Wix.exe.

How do I install WiX on my laptop?

Step 1: To download and install WiX on windows, go to the official website of WiX as below https://wixtoolset.org/releases and choose the recommended build number, here we have chosen V3. 11.1 and click on the download button.


1 Answers

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.

like image 200
Jared G Avatar answered Oct 17 '22 05:10

Jared G