This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- problem with custom defined install folde(installdir) in the basic msi project
Subscribe
- 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
Jun 26, 2009
04:12 AM
problem with custom defined install folde(installdir) in the basic msi project
what we want to do:
The environment variable of the customer's pc (destionation pc) contains the path where our product are going to be installed. So when we install the product , we need find the path in the destionation pc by a system search and give the value to INSTALLDIR.
the method we use right now is based on the solution from Acresso :
http://www.google.dk/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fwww.acresso.com%2Fwebdocuments%2FPDF%2Fis_install_dir_from_app_search.pdf&ei=cYdESryQIcarjAeTk81k&usg=AFQjCNEk6Y1sBpu8-HbRkQZlSPUNcfAuew
In the solution :
First , we make one system search on the registry. the enviornment variableis store in the registry key :
HKEY_CURRENT_USER\ENVIRONMENT\VARIABLE_NAME
and store this key vaule which is the path to a property variable .
then , we define a custom action (set directory) , in the action we give the property variable value(path ) to INSTALLDIR.
the problem is :
it works fine if the path in the eviornment variable really exist in the customer 's pc . but it failed when the path is not really existing in the customer' pc .
I am very confused by this result. Because the system search on the registry key only give us a value in the registry key. why it cares about if it really exists? if not exist, the msi package will create the folder by the value in the INSTALLDIR .i mean the msi will create the folders given by the INSTALLDIR anyway . right ?
who can give me some clues , thansk very much .
you are welcome to contact me at
jl@iccc.dk
The environment variable of the customer's pc (destionation pc) contains the path where our product are going to be installed. So when we install the product , we need find the path in the destionation pc by a system search and give the value to INSTALLDIR.
the method we use right now is based on the solution from Acresso :
http://www.google.dk/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fwww.acresso.com%2Fwebdocuments%2FPDF%2Fis_install_dir_from_app_search.pdf&ei=cYdESryQIcarjAeTk81k&usg=AFQjCNEk6Y1sBpu8-HbRkQZlSPUNcfAuew
In the solution :
First , we make one system search on the registry. the enviornment variableis store in the registry key :
HKEY_CURRENT_USER\ENVIRONMENT\VARIABLE_NAME
and store this key vaule which is the path to a property variable .
then , we define a custom action (set directory) , in the action we give the property variable value(path ) to INSTALLDIR.
the problem is :
it works fine if the path in the eviornment variable really exist in the customer 's pc . but it failed when the path is not really existing in the customer' pc .
I am very confused by this result. Because the system search on the registry key only give us a value in the registry key. why it cares about if it really exists? if not exist, the msi package will create the folder by the value in the INSTALLDIR .i mean the msi will create the folders given by the INSTALLDIR anyway . right ?
who can give me some clues , thansk very much .
you are welcome to contact me at
jl@iccc.dk
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 26, 2009
09:56 AM
Do you have a condition on the set-directory action that ensures the search property has a value?
(As an aside, instead of reading the environment variable from the registry, you might consider using the Windows Installer "Formatted" expression [%VAR_NAME] as the target of a set-directory action and skipping the search...)
(As an aside, instead of reading the environment variable from the registry, you might consider using the Windows Installer "Formatted" expression [%VAR_NAME] as the target of a set-directory action and skipping the search...)