W.J. Llope

hi folks - my first post here.

i've successfully deployed my app to a clean computer. because of the libraries i'm using (root.cern.ch) i have no choice but to insure that a new environment variable is set on the target computer during the installation (i'm using MSI not clickonce). i also have to append to %PATH% on the target computer....

after quite some searching, i understand that i must edit the environment table in the msi file. i opened the installer in orca.exe, and i can see the Environment table, and i know i need to add 2 rows there. but after a lot of reading i am still very unsure what 4 strings need to be in these rows!

i.e. i want the name of the environment variable to be ROOTSYS, and its value to be [TARGETDIR], but i don't know what to put in the "Environment" and "Component" columns..... i RTFM and everything google can find but it's still not clear to me what the "primary key" and "external key to component table" columns are, respectively.

for appending to the path, i assume i just define a 2nd row in the Environment table, with name PATH and value Movie;[TARGETDIR]\bin\ but still i am not clear on the other columns...

i see the WriteEnvironmentStrings action (condition= empty, Sequence= 5200) and the RemoveEnvironmentStrings action (condition= empty, Sequence= 3300) in the InstallExecuteSequence Table, so i guess that part is all set.

any hints would be greatly appreciated! - newbie

p.s. BTW: Visual Studio Standard, both dev and target machines are XP Pro, validated & w/ all updates.....

Re: Visual C++ General setting an environment variable on target computer

W.J. Llope

i'll answer my own question.... i opened my msi file in InstallShield Pro, added&appended to some env vars, saved the msi file, then i opened it back up in orca to see what it did.... ham-handed, i know, but this helped give me some hints.... after some playing around a little & testing, the 4 columns i need are

define_ROOTSYS | ROOTSYS | [TARGETDIR] | C_yadayadayada
add_to_PATH | =*PATH | Movie;[TARGETDIR]\bin | C_yadayadayada

where C_yadayadayada i got this way. click on Component table on left-hand side in orca, & on right-hand side, look for the row that has TARGETDIR in the Directory column, then copy the value from the first column of this row to the clipboard and use that in the 4th column in the new rows of the Environment table....

i'm too scared to try "=-*PATH" for the second row above. i read somewhere here that i might end up deleting the path string completely upon removal of the deployed app from the target computer (making it unbootable ).... something to test another day... cheers

Re: Visual C++ General setting an environment variable on target computer


Hi this information about setting environment variable is really useful.

Re: Visual C++ General setting an environment variable on target computer


It's been a while since you've post this answer but...

Could you please inform me/us what should be in the place of the movie image Right now my complete path variable gets completely overridden.

[edit]Allready found out it. Should be an [ and ~ and ] concatenated. This forum replaces these three chars to a movie image[/EDIT]