I have attempted to use custom actions in wix3 created using Visual Studio
2005 and WIX 3
The error message appears when i execute the msi file
There is a problem with this Windows installer package.
A DLL required for this install to complete could not be run. Contact your
support personnell or package vendor.
Can anyone direct me towards samples using wix3 + votive and visual studio
with managed custom actions written in C#
WixCustomActions.wxs
-------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="{A62D5476-1335-4721-9CDA-E6F5B23E84F9}" Name="Hello world
sample"
Language="1033" Version="1.0.0.0" Manufacturer="Hello World inc"
UpgradeCode="{298B84DE-352E-44F9-A043-202EC9A68DAC}">
<Package InstallerVersion="200" Compressed="yes" Description="Hello
world installer"
Comments="testpackage " />
<Property Id="DiskPrompt" Value="the disk prompt" />
<Media Id="1" EmbedCab="yes" Cabinet="sample.cab" />
<Binary Id="CustomUtil" SourceFile="HelloCustomAction.dll" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLLOCATION" Name="Hello world
dir">
<Component Id="ProductComponent"
Guid="{95AD1474-BC7F-4B2A-808C-D10D4D0ED755}">
<File Id='HelloWorldEXE' Name='HelloWorld.exe'
Source='..\..\..\HelloWorld\bin\Debug\HelloWorld.exe'
Vital='yes'/>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentRef Id='ProductComponent' />
</Feature>
<!--CustomAction Id="InstallSetProp" Property="Install"
Value="/installtype=notransaction /action=install /LogFile=
"[#InstFile]" "[#InstCfgFile]"" /-->
<CustomAction Id="Install" BinaryKey="CustomUtil"
DllEntry="ManagedInstall" Execute="deferred" />
<InstallExecuteSequence>
<!--Custom Action="InstallSetProp"
After="StartServices">$ProductComponent>2</Custom-->
<Custom Action="Install"
After="StartServices">$ProductComponent>2</Custom>
</InstallExecuteSequence>
</Product>
</Wix>
--------------------------------
CustomInstaller.cs
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using System.Windows.Forms;
[RunInstaller(true)]
public partial class CustomInstaller : Installer
{
public CustomInstaller()
{
InitializeComponent();
MessageBox.Show("hello custom action");
}
public override void Install(IDictionary stateSaver)
{
MessageBox.Show("install");
base.Install(stateSaver);
}
public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
MessageBox.Show("Uninstall");
}
public override void Commit(IDictionary savedState)
{
base.Commit(savedState);
MessageBox.Show("Committing");
}
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
MessageBox.Show("Rolling back");
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users