views:

451

answers:

2

Hi,

I'm fairly new to WIX. Bare with me.

I wish to install Microsoft POS (Point of service) with my installer, after installing .net fx, sql server compact edition, etc.

I am willing to supply the downloaded exe with installer (no need to get it from the web).

I've found this link. The article in the link indicate that you need to call setup with some parameters. But I've got no clue how to do this Wix wise. Second I am not sure that it is the right way do it as well. (maybe a merge module is needed?)

Anybody knows?

Thanks Ariel

+3  A: 

Wix produces MSI files, and you cannot launch a setup program from inside an MSI. If you find a merge module for POS you can included it in your Wix. Otherwise you'll have to use a bootstrapper to install POS first and then launch your MSI (like DotNetInstaller).

Nestor
Yes, it creates an MSI - but you can still call external applications, even those are only EXE's. Granted, a merge module would be the preferred way to go, but if only an EXE is available, that can be called via a custom action, too!
marc_s
Not if that EXE is actually a bootstrapper that will in turn invoke an MSI. My understanding was that the POS installer was in fact a bootstrapper... but, I could be wrong.
Nestor
Ah yes - good point. If the POS install is indeed an MSI, then you'd have to have a merge module
marc_s
+1 for DotNetInstaller link, I've been looking for a good replacement for msbuild's GenerateBootstrapper task.
Wim Coenen
but POS is not a Merged Module, as far I can find around the web. what can I do? convert the MSI to msm?
ArielBH
I've seen tools to convert MSM to MSI, but not the other way around.I think you'll need a bootstrapper after all.
Nestor
A: 

If you can't get a merge module (which would be the preferred solution, if the item is made available by the publisher), you can include an EXE with the installation and then execute it during your WiX install as a custom action.

From the excellent tutorial on WiX at Tramontana, here's a page on custom actions and how to set them up - you basically need to define a <CustomAction> element in your WiX file and specify what to do when it's executed:

<CustomAction Id='LaunchFile' FileKey='FoobarEXE' ExeCommand='' Return='asyncNoWait' />

This will launch a file that you just installed as part of your app and that is referenced in your WiX script as FoobarEXE.

<CustomAction Id='LaunchFile' BinaryKey='FoobarEXE' ExeCommand='' Return='asyncNoWait' />

This would reference a binary file (e.g. an EXE), that you included in your WiX installation package (MSI or CAB), but that's not been installed as part of the installation, and that's been extracted as a binary file.

Once you know what you'll do, you need to define when in the sequence of installation steps, this custom action should be executed:

<InstallExecuteSequence>
  ...
  <Custom Action='LaunchFile' After='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>

Here, the custom action called LaunchFile will be executed after the installation has finalized, but only, if it was determined that the app had not been installed yet.

So, I guess, you should be able to do what you're striving to do with a Custom Action in WiX - see the WiX 2.0 documentation and Steven Bone's blog post series for additional info.

Hope this helps!

Marc

marc_s
You cannot use windows installer while it is already running. This is such a case: the POS installer is an exe wrapper that invokes windows installer, so you cannot use the exe as a custom action during another installation.
Wim Coenen