Hi,

I guess I have to go the same way for the PostgreSQL installer (made with 
bitrock).
How do you have created the stub EXE? Is ther something within the WIX 
toolset or do I have to create a C# project?

Best regards,
  Thomas



Von:    jhennessey <jack.hennes...@hyland.com>
An:     wix-users@lists.sourceforge.net
Datum:  29.08.2012 07:32
Betreff:        Re: [WiX-users] Burn - InstallAnywhere ExePackage



UPDATE: OK, using the recommendation of creating a stub EXE I have got 
this
working. Here's what I did in case anyone else needs to handle this type 
of
installer.

1. Created a stub executable that manages the installation and removal of
the package. The stub exe does a few things:

    a) Parses some command line parameters (to pass the install /
uninstall).
    b) Launches the specified executable.
    c) Returns the exit code from the launched process (so burn knows if 
it
failed or succeeded).

2. In order to determine if the actual package was installed, I used a 
burn
file search (since I knew where the uninstall.exe file should be) and used
that variable for the ExePackage/@DetectCondition. This way the package
would be installed if the file wasn't found.

3. Added a Payload element for the real install package.

In the end here is an example of what my WiX authoring looked like:


<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>
  <Fragment>
 
    <util:FileSearch
Path="[ProgramFilesFolder]MyCompany\MyProduct\uninstall\uninstall.exe"
Variable="ThirdPartyUninstallExecutable"/>

    <PackageGroup Id="ThirdPartyProduct">
      <ExePackage Id="ExePackageStub_ThirdPartyProduct"
                  DisplayName="Third Party Product"
                  Description="Third Party Product"
                  PerMachine="yes"
                  SourceFile="C:\Visual Studio
Projects\Bootstrapper1\ExePackageStub\ExePackageStub.exe"
                  DetectCondition="ThirdPartyUninstallExecutable"
                  InstallCommand='-ExeFile "ThirdPartyInstall.exe"
-ExeCommandLine "-i silent
-DUSER_INSTALL_DIR=\"[ProgramFilesFolder]MyCompany\MyProduct\"
-DREGISTER_UNINSTALLER_WINDOWS=FALSE"'
                  UninstallCommand='-ExeFile
"[ThirdPartyUninstallExecutable]" -ExeCommandLine "-i silent"'>

 
        <Payload SourceFile="C:\Visual Studio
Projects\Bootstrapper1\ThirdParty\ThirdPartyInstall.exe" />
      </ExePackage>
    </PackageGroup>
  </Fragment>
</Wix>

So, as you can see, I used the ExePackage/@InstallCommand and
ExePackage/@UninstallCommand to pass my stub EXE the information I needed 
to
run the install or uninstall. If you are installing an InstallAnywhere
package the "-DREGISTER_UNINSTALLER_WINDOWS=FALSE" switch prevents it from
adding an entry in ARP.

Another tip, for the exe stub, if you are using the 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx

CreateProcess  function be sure that the first part of the command line is
the full path to the executable you are launching.

Hope this helps someone (and thanks for the initial suggestion)!



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-InstallAnywhere-ExePackage-tp7580040p7580152.html

Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to