- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: DATABASEDIR set by Custom Action but not (always) taken into account
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
DATABASEDIR set by Custom Action but not (always) taken into account
I have an InstallShield LE4VS project that installs an extension to Visual Studio. Therefore, I need to install parts to the Visual Studio's Extensions folder.
Since the installation folder of Visual Studio can be different per machine, I use a script to find the installation path, then I assign that path to DATABASEDIR. So I have a CustomActions.vbs with something like:
Function SetDatabaseDir()
Session.Property("DATABASEDIR") = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\"
End Function
(Except in reality I do a registry lookup to find the right path, but that works, no issue there.)
Tihs custom action is registered as an "After Initialization" action.
The strange thing now, is that when I run the installer, when it askes for the database dir, it shows the right path that my script has defined, but if I click next/next/next, it does not use that path, hence installs incorrectly.
However, if I run the installer, and when it asks for the database dir, showing the right path, I press the Change button, and then immediately OK to confirm that path, it does use that path and installs correctly.
What am I possibly doing wrong ??
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Try creating a verbose install log by enabling Create MSI Log option in the General Information view.
Try to see where the DATABASEDIR property changes value in the log file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dear,
I activated logging and in both cases I get on line 405 the indication that the property DATABASEDIR has changed. Whether I pressed Change or not (the MaxNextNextNext.txt logfile is without pressing Change, the other one is with pressing Change and then OK, both logfiles are in the attached ZIP file).
Line 405:
MSI (c) (70!68) [00:00:00:425]: PROPERTY CHANGE: Modifying DATABASEDIR property. Its current value is 'C:\Program Files (x86)\Arebis\MAX Extensions for VS.NET 2015\VS.NET Extensions\'. Its new value: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\'.
Note that you can get the whole source of the solution including the installer from:
https://github.com/codetuner/Arebis-MAX-Mapper/tree/vs2015
(Make sure to take the 'vs2015" branch to which the above URL will bring you).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
https://github.com/codetuner/Arebis-MAX-Mapper/tree/vs2015
(make sure to take the 'vs2015' branch, to which the above URL will bring you)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
https://github.com/codetuner/Arebis-MAX-Mapper/tree/vs2015
(Make sure to take the 'vs2015" branch to which the above URL will bring you).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content