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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Use the 'Environment' table.

Column names: Environment,Name,Value,Component_
Row entries: SERVER,=-SERVER,[NAME_OF_PUBLIC_PROPERTY],Environment

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.
Answered 05/28/2009 by: VBScab
Red Belt

Please log in to comment
0
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.
Answered 05/28/2009 by: binarycortex
Senior Yellow Belt

Please log in to comment
0
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.
Answered 05/28/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity