2

For a custom action I need the location of the installers bootstrapper path.

session["SourceDir"] gives me:

C:\ProgramData\Package Cache\{67668D1E-88B7-4D10-B1B5-98D42AA088E5}\...
but my setup during my test is located in C:\Temp which is what I would expect.

Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
Rainer
  • 326
  • 2
  • 14

1 Answers1

3

You need to pass bootstrapper variable into MSI.

The variables you can pass: http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html

This seems what you want: WixBundleOriginalSource - gets the source path from where the bundle originally ran.

How can you pass it from the bootstrapper:

<MsiPackage SourceFile='ProductSetup.msi' DisplayInternalUI='yes'>
   <MsiProperty Name='CONFIGFILELOCATION' Value='[WixBundleOriginalSource]' />
</MsiPackage>

This will make CONFIGFILELOCATION property available in your ProductSetup.msi file, which you then can access.

Erti-Chris Eelmaa
  • 25,338
  • 6
  • 61
  • 78
  • Using `session[OriginalDatabase]` gives me `C:\ProgramData\Package Cache\{8CB19C9C-216F-40DA-B9FA-55D1735F6A67}v1.0.1.0\Setup X1-netfabb.msi` not `C:\Temp\Setup.exe` To clarify: `X1-netabb.msi` is part of my bootstrapper project and calls the custom action. `Setup.exe`is the Bootstrapper. – Rainer Dec 19 '14 at 09:55