How to install feature based on the property set in custom action?

Too late to test all of this, but here goes with some information. I will check back tomorrow. Essentially I think the problem is your custom action sequencing. Try before Costing. Some things to consider: Custom action sequencing: you need to sequence your custom action right and it needs to be present in both silent … Read more

How to run a “.bat” file during installation?

Well, after much searching and trial and error I have solved this. I’m not sure if this is the best way, but it works. Here’s the scenario: I have an application I would like to deploy via a Visual Studio Setup project. In addition to my application files, I would like to create a subdirectory … Read more

WiX silent install unable to launch built in .EXE: WiX v3

Faulty Configuration: This line would never run – regardless of silent or interactive mode: <Custom Action=”SilentExecExample” After=”TheActionYouWantItAfter”/> The After attribute must specify a valid StandardAction or CustomAction name. Silent Mode Failure: The line below will fail in silent mode because you run it after InstallFinalize. In this case it will not run with elevation (unless … Read more

Interrupt installation when custom action returns error

Quick Link: Managed Code Custom Actions (below is for C++ native custom actions). UPDATE: Some helpful links. Hello WiX (minimal WiX Visual Studio Project). WiX quick start suggestions. Debugging Custom Actions (for native code / C++ just attach debugger to msiexec.exe). Microsoft Debugging Environments. Dynamic Link Libraries. Suspected causes: Listing some suggestions at the top … Read more

How to pass CustomActionData to a CustomAction using WiX?

Deferred custom actions can not directly access installer properties (reference). In fact, only CustomActionData property session.CustomActionData and other methods and properties listed here are available on the session object. Therefore, for a deferred custom action to retrieve a property such as the INSTALLLOCATION, you have to use a type 51 custom action — i.e. a … Read more

How to add a WiX custom action that happens only on uninstall (via MSI)?

EDIT: Perhaps look at the answer currently immediately below. This topic has been a headache for long time. I finally figured it out. There are some solutions online, but none of them really works. And of course there is no documentation. So in the chart below there are several properties that are suggested to use … Read more

Removing files when uninstalling WiX

Use RemoveFile element with On=”uninstall“. Here’s an example: <Directory Id=”CommonAppDataFolder” Name=”CommonAppDataFolder”> <Directory Id=”MyAppFolder” Name=”My”> <Component Id=”MyAppFolder” Guid=”*”> <CreateFolder /> <RemoveFile Id=”PurgeAppFolder” Name=”*.*” On=”uninstall” /> </Component> </Directory> </Directory> Update It didn’t work 100%. It removed the files, however none of the additional directories – the ones created after the installation – were removed. Any thoughts on … Read more

tech