/build/static/layout/Breadcrumb_cap_w.png

Reading local environment variable values in an MSI

Hy,

(I'm french guy). I'm using InstallShield and I want to get a the target computer local environment variable. I want to know the right syntax. I try [%MyVar] but the syntax seems wrong.

Someone have an idea?

Thanx for your help.


0 Comments   [ + ] Show comments

Answers (1)

Posted by: EVEEN 10 years ago
Green Belt
0

The syntax to get the value from a local environment variable is in deed [%VarName]. There are limited scenario's where you can directly use this.

It's in setting new environment variables PATH=[%PATH];[INSTALLDIR] or in Registry writes.

If you want to do something more structural with the value try storing it in a property you declare for it and working with that property your project.

 

 


Comments:
  • Don't forget to control for SYSTEM variables vs. USER variables. This can cause havoc, depending on which account you are running the install under. r2

    Ron Colson
    KACE Koach - ronco 10 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ