How can I use a PROPERTY=Value to set an environment variable?

I am repackaging an application as an MSI and as part of the install I need to set an environment variable so the app knows where the license server is. Is there a way to change the server location (Environment Variable's value) using a public PROPERTY=Value in the command line?

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 13 years ago
Red Belt
Use the 'Environment' table.

Column names: Environment,Name,Value,Component_

The "=-" prefix tells the engine that it is to be set on install and removed on uninstall.

In the 'Component' table:

Column names: Component,ComponentID,Directory_,Attributes,Condition,KeyPath
Row entries: Environment,{Your_Component_GUID},TARGETDIR,0,,,

I posted a script earlier today which you can use to generate a GUID. Paste that GUID into the ComponentID cell.
Posted by: binarycortex 13 years ago
Senior Yellow Belt
Thanks for the help, but when I do the install the environment variable looks like this ENVNAME=PUBLICPROPERTYNAME. It does not have the value of the public property. Did i do something wrong?

Edit: I couldn't find your script for generating guids but I found guidgenerator.com.
Posted by: anonymous_9363 13 years ago
Red Belt
You probably omitted the square brackets around the property name in the Environment table. Sorry, I should have made it clear that they were required.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

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

Sign up! or login


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