cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChristianS
Level 4

Is there a way to use Path Variables in InstallScript?

Hello,

is there a way to use path variables in the script? I can't seem to find the right page in the documentation 😕


Thank you,
ChristianS
Labels (1)
0 Kudos
(4) Replies
Johannes_T
Level 6

Hi Christian,
not really sure what you're looking for, but you can access _the_ path variable (containing the ; separated list of folders) via RegDbGetKeyValueEx and the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment / value: Path.
As far as I know, changes take effect after the next reboot.
HTH,
Johannes
0 Kudos
ChristianS
Level 4

Hello,

Sorry, I should have expressed myself more clearly.
I meant the Standard path variables you define in the Path Variables View of the InstallShield IDE.

More info:
I use the variables during development to point to the media I want to install. I I want to use the path variables during installation to perform specific actions depending on where the media came from.
Right now I have to change the path variable itself and then copy it by hand into installscript. It would be more convenient if I only had to change it in one place.
0 Kudos
Matthias1967
Level 5

Hello Christian,

the path variables are resolved and "gone" as soon as the install package is built.

Moreover, they do not refer to the installation medium (CD or network or whatever), but to the very source on your developer's machine. I do not think that this file structure is useful information for the installation process running on the user's machine.

If you do want the setup to behave differently depending on the source paths you have built from, you should:
1) Reconsider your design.
2) include this information in a location (separate file, ini entry, ...) that is accessible at installation time.

Best regards, Matthias
0 Kudos
ChristianS
Level 4

Thank you for your answers!
I will consider a redesign although it would have been a neat shortcut...
0 Kudos