Set installation Directory from a property from system search
Hi,
I am using Wise Package Studio 6.01 to create packages
I have a package that needs to check a registry key to find out where it should be installed. The package is dependant on Lotus Notes.
The key is HKLM\Software\Lotus\Notes[DataPath]=C:\Program Files\Lotus\Notes\Data\
I have used system search to fill set a property DATADIR with the value read from this key. I had to use "Read raw value from registry" option to get the full path out of the key. I tested it by displaying the value in the Execute Immediate section of the msi script.
My problem is that I can't make my script install to this directory.
I have my files in a folder called c:\program files\test. I thought that if I set INSTALLDIR=DATADIR then this would set the Install Directory to be DATADIR instead of c:\program files\test
What am I doing wrong, or how should I do this?
Thanks,
Muttley
I am using Wise Package Studio 6.01 to create packages
I have a package that needs to check a registry key to find out where it should be installed. The package is dependant on Lotus Notes.
The key is HKLM\Software\Lotus\Notes[DataPath]=C:\Program Files\Lotus\Notes\Data\
I have used system search to fill set a property DATADIR with the value read from this key. I had to use "Read raw value from registry" option to get the full path out of the key. I tested it by displaying the value in the Execute Immediate section of the msi script.
My problem is that I can't make my script install to this directory.
I have my files in a folder called c:\program files\test. I thought that if I set INSTALLDIR=DATADIR then this would set the Install Directory to be DATADIR instead of c:\program files\test
What am I doing wrong, or how should I do this?
Thanks,
Muttley
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
brenthunter2005
18 years ago
Hello Muttley,
You are on the right course, but here are a few pointers:
Don't assume that INSTALLDIR equals the installation path of your MSI package. This is simply a public property. If you want the MSI package to install to DATADIR, then you need to look at the Directory table and find the Directory keyname relating to the 'test' part of your "c:\program files\test\" folder path. You then set this new directory path name by using the "Set Directory" custom action, ensuring that the custom action is placed directly after the CostInitialize action.
By doing this you are telling the MSI package to reconfigure the folder paths.
Does this help?
You are on the right course, but here are a few pointers:
Don't assume that INSTALLDIR equals the installation path of your MSI package. This is simply a public property. If you want the MSI package to install to DATADIR, then you need to look at the Directory table and find the Directory keyname relating to the 'test' part of your "c:\program files\test\" folder path. You then set this new directory path name by using the "Set Directory" custom action, ensuring that the custom action is placed directly after the CostInitialize action.
By doing this you are telling the MSI package to reconfigure the folder paths.
Does this help?
Posted by:
Muttley2
18 years ago
Posted by:
brenthunter2005
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.