0

I have an application with a bootstrapper that installs multiple components below it. The code below uses ninject to have a loosely coupled database layer.

With regards to the bundle/bootstrapper, I would like to move the database layer out into a separate msi in order to support optional data layer choices on install (e.g.: radio buttons to install SQLite/SQLExpress/MySQL etc..).

I am struggling to figure out how to get the install directory working though, as the database components needs to install into the root/install directory of the main application. (rather than using the gac etc).

How can I do this? I have tried the steps mentioned here: How to use properties to set the installation path? but to no avail. I must have something wrong.. but given the code is spread over 5(ish) files, it seems a little large to load here!

Any pointers to get started trying to implement this, or should I go ahead and upload the code?

Community
  • 1
  • 1
Chris Watts
  • 822
  • 1
  • 9
  • 27

1 Answers1

1

The method you refer to should work. Note however that the name of the property given in

<MsiProperty Name="INSTALLLOCATION"

should match the name used in wxs file of the corresponding MSI package. Typically if the MSI was created based on WixUI_InstallDir template the name would be APPLICATIONFOLDER and in the default template without the UI it is INSTALLFOLDER.

dvorn
  • 3,107
  • 1
  • 13
  • 12
  • So in terms of setting that property to `program files\appname` the example i linked to sets the bootstrapper variable to `programfilesfolder` do i then need to add the appname? I dont want the user to configure install directory, just install all the optional components to the same directory. Sorry if im sounding a bit behind here, just a lot of unknowns! – Chris Watts Apr 17 '17 at 07:05
  • Yes you may set the installation directory to whatever you want, e.g. Value="[ProgramFilesFolder]YourCompanyName\YourAppName" – dvorn Apr 17 '17 at 07:29
  • you gem! works a treat! thats great, I was sat scratching my head trying to figure out ways round the problem. The main missing detail was the name of the msi property to be passing in, based on ui/non-ui etc. – Chris Watts Apr 17 '17 at 08:39