/build/static/layout/Breadcrumb_cap_w.png

Environment variables in an MSI?

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.

Environment:?

Name: Server

value : ha@2500

component : any component

Is this right?

 

Please suggest me and thanks in advance.


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: jaybee96 11 years ago
Red Belt
1

system or user variable?

Environment:    NewEnvironment1

Name:              *=-server

Value               [~];ha@2500

Component      NewComponent2

 

for more info:http://msdn.microsoft.com/en-us/library/windows/desktop/aa368369(v=vs.85).aspx


Comments:
  • * means system variable - jaybee96 11 years ago
Posted by: GeekSoldier 11 years ago
Red Belt
1

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!).


Comments:
  • It is a best practise to make use of msi tables when possible. If not, use custom actions. - SnowLyric 11 years ago
    • 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. - GeekSoldier 11 years ago
 
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