Get and Use Environment Variable
I am trying to get an environment variable from the computer that is to receive my packaged installation and use the value in numerous registry entries, already contained in my package. How can I do this? I have looked everywhere and not found any solutions that I can understand. I am using Installshield AdminStudio 8.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
nheim
17 years ago
Hi John,
do the following:
Create a dummy line in the directory table, with an new property (all caps), which will take the env-var. Let it point to a standard folder.
Create a custom action type 51, which will set this property to the env-var. Something like this:
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
Call it right before 'CostInitialize' in both sequence tables.
Make sure, everything is linked correctly in the directory table.
Now you can use all the directory properties you wish.
That's it.
Regards, Nick
do the following:
Create a dummy line in the directory table, with an new property (all caps), which will take the env-var. Let it point to a standard folder.
Create a custom action type 51, which will set this property to the env-var. Something like this:
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
Call it right before 'CostInitialize' in both sequence tables.
Make sure, everything is linked correctly in the directory table.
Now you can use all the directory properties you wish.
That's it.
Regards, Nick
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.