0
votes

I'm trying to update a Wix package (last run 6 years ago), via the Visual Studio 2019 Wix extension. I am not experienced with Wix or Msi files.

I amended the script we had, to include new components and remove obsolete components. However, it is failing to build with the following messages:

Error       ICE68: Invalid custom action type for action '_901E28F5_5222_4D39_B080_BBDFD2D558BF.install.SetProperty'
Error       ICE68: Invalid custom action type for action '_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall.SetProperty'

The error is raised in lines 15 and 17 as follows:

14    <CustomAction Id="_901E28F5_5222_4D39_B080_BBDFD2D558BF.install" BinaryKey="InstallUtil" DllEntry="ManagedInstall" Execute="deferred" Impersonate="no" />
15    <CustomAction Id="_901E28F5_5222_4D39_B080_BBDFD2D558BF.install.SetProperty" Property="_901E28F5_5222_4D39_B080_BBDFD2D558BF.install" Value="/installtype=notransaction /action=install /LogFile= &quot;[#_02E1DEA55215061A3CC25B6DF52B45F7]&quot; &quot;[VSDFxConfigFile]&quot;" Impersonate="no" />
16    <CustomAction Id="_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall" BinaryKey="InstallUtil" DllEntry="ManagedInstall" Execute="deferred" Impersonate="no" />
17    <CustomAction Id="_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall.SetProperty" Property="_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall" Value="/installtype=notransaction /action=uninstall /LogFile= &quot;[#_02E1DEA55215061A3CC25B6DF52B45F7]&quot; &quot;[VSDFxConfigFile]&quot;" Impersonate="no" />

The custom action id is referenced under the <InstallExecuteSequence> tag as:

  <Custom Action="_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall.SetProperty" Sequence="1651">$C__02E1DEA55215061A3CC25B6DF52B45F7=2</Custom>
  <Custom Action="_901E28F5_5222_4D39_B080_BBDFD2D558BF.uninstall" Sequence="1652">$C__02E1DEA55215061A3CC25B6DF52B45F7=2</Custom>
  <Custom Action="_901E28F5_5222_4D39_B080_BBDFD2D558BF.install.SetProperty" Sequence="5998">$C__02E1DEA55215061A3CC25B6DF52B45F7&gt;2</Custom>
  <Custom Action="_901E28F5_5222_4D39_B080_BBDFD2D558BF.install" Sequence="5999">$C__02E1DEA55215061A3CC25B6DF52B45F7&gt;2</Custom>

Component C__02E1DEA55215061A3CC25B6DF52B45F7 is the main .exe file of the application, declared as:

  <Component Id="C__02E1DEA55215061A3CC25B6DF52B45F7" Guid="{8F0503F6-A642-2D2C-C370-49FEAA8F458D}">
    <File Id="_02E1DEA55215061A3CC25B6DF52B45F7" Name="MyApplication.exe" KeyPath="yes" ShortName="d_0k9edv.exe" Assembly=".net" AssemblyManifest="_02E1DEA55215061A3CC25B6DF52B45F7" AssemblyApplication="_02E1DEA55215061A3CC25B6DF52B45F7" DiskId="1" Source="bins\File\_02E1DEA55215061A3CC25B6DF52B45F7">
      <NativeImage Id="ngen_MyApplication.exe" Platform="32bit" Priority="1" xmlns="http://schemas.microsoft.com/wix/NetFxExtension" />
    </File>
    <Shortcut Id="_1BE76B3655A64533BB29E6D5DE370C53" Directory="_C6B6AF321296444185E915D4800B50FF" Name="My Application" ShortName="7onuutmc" Icon="_E927036F4145CB7F0D9F32.exe" IconIndex="0" Show="normal" WorkingDirectory="TARGETDIR" Advertise="yes" />
    <Shortcut Id="_F8B525F5B9314CB684B09B3AFD8F3F96" Directory="DesktopFolder" Name="My Application" ShortName="-uvlgxeh" Icon="_46C82FB57E11DA24ADA00F.exe" IconIndex="0" Show="normal" WorkingDirectory="TARGETDIR" Advertise="yes" />
  </Component>

MyApplication.exe is a .NET application and has an "installer" custom code action compiled into it, using the pattern of the old Visual Studio vdproj project type, and I think it is this that these declarations are trying to deal with.

This script used to work in 2014 when it was last needed - has anything changed in Wix world that disables these actions?

Having tried and failed to make this build using the Wix file from 6 years ago, I used the latest Dark to reverse-engineer the .msi file into .wxs. It produces the same lines, and does not build.

I am struggling therefore to work out why Dark generates something that Light/Candle can't then handle.

1
How many custom actions are we talking about? Do you know what they do? (by no means certain for anyone who has touched old setups)Stein Åsmul

1 Answers

0
votes

While dark can be useful at times it's nothing approaching say Redgate .NET Reflector in terms of being able to recreate a buildable source project from a built MSI. It'll give you useful snippets but that's about it.

I would either try to reproduce the MSI using the original source from years ago or rewrite the MSI from scratch. FWIW, I have an open source tool called IsWiX (https://github.com/iswix-llc/iswix-tutorials) that can help. Additionally I am available for consulting if you just want to press the easy button and get the whole thing solved ASAP.