OK, I know it's not the best way to install things with WiX, but my product 
includes a DirectShow filter, and they create some random binary registry 
entry on selfRegistration, so I have little choice but to register it as 
self reg.

unfortunatley, because it depends on the DirectShow samples in the SDK, it 
also ends up depending on the latest version of the run time libraries (at 
least I couldn't get it to build without them being dynamically linked).

So, I'm stuck.

I've authored the following to selfreg after I've installed the msm's for 
vs2005:

            <Component Id="AxGrab" Guid="{MYGUIDS}">
              <File Id="axgrab" Name="grabber.ax" 
Source="..\Grabber\Release\grabber.ax"  />
            </Component>

then to declare the custom actions, I add:

    <CustomAction Id="regGrabber" Execute="commit" 
Directory="INSTALLLOCATION" ExeCommand='"[SystemFolder]msiexec" /y 
"[#axgrab]"' Impersonate='no' />
    <CustomAction Id="unregGrabber" Execute="commit" 
Directory="INSTALLLOCATION" ExeCommand='"[SystemFolder]msiexec" /x 
"[#axgrab]"' Impersonate='no' />
    <CustomAction Id="rollbackGrabber" Execute="rollback" 
Directory="INSTALLLOCATION" ExeCommand='"[SystemFolder]msiexec" /x 
"[#axgrab]"' Impersonate='no' />

finally, in the install execute sequence I add:
<InstallExecuteSequence>
...
      <Custom Action="unregGrabber" 
Before="SelfUnregModules">$AxGrab=2</Custom>
      <Custom Action="regGrabber" Before="InstallFinalize" 
 >$AxGrab>2</Custom>
      <Custom Action="rollbackGrabber" After="regGrabber" 
 >$AxGrab>2</Custom>
...
</InstallExecuteSequence>

I haven't checked my logs yet as I've had to do a full restore to get back 
to a known state, but while uninstalling, I got the message "are you sure 
you wan't to uninstall", and regardless of how i answer, the uninstall rolls 
back and says there's some error.  That may not be to do with this though, 
as some other weirdness is also going on calling DPInst.exe to install a 
device driver.

Does the above sequence look like the right sequencing and conditions for 
the CustomActions?
Should I be ignoring the return codes using Return="ignore"

Anthony Wieser
Wieser Software Ltd


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to