Help me with how to set environment variable in an msi

I got an application where it is mentioned to add environment variable.

Name : Server

value :ha@2500


I know that we can add them in environment variable table. But, i've seen that we need to prefix some symbolics and this is the first time that I'm adding an environment variable.


Name: Server

value : ha@2500

component : any component

Is this right?


Please suggest me and thanks in advance.

Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment



system or user variable?

Environment:    NewEnvironment1

Name:              *=-server

Value               [~];ha@2500

Component      NewComponent2


for more info:

Answered 04/07/2013 by: jaybee96
Red Belt

  • * means system variable
Please log in to comment

I found that this can be done by the scripting module in KACE. Use a batch file to edit registry keys located @ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Once you reboot the settings should work and you can proceed with your MSI. I recommend testing this on a VM with a prerecorded snapshot so if something breaks it's a quick restore away. Note that if you're using another solution to deploy your MSI you could make this part of a logon script as well (test test test!).

Answered 04/07/2013 by: GeekSoldier
Red Belt

  • It is a best practise to make use of msi tables when possible. If not, use custom actions.
    • Maybe so, I have a script that does this for one of our proprietary applications. I wasn't saying it's the only way to do it, but it is a way to do it.
Please log in to comment
Answer this question or Comment on this question for clarity