Scripting Question

System Environment variable & User Environmental variable?

06/08/2017 2072 views
I know how to add.But i want to know why we add system & user Environmental variable.why some time we choose to add as user and some times as system Environmental variable.what will happen if add only user Environmental variable.

Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author

  • Thanks i got the thing.System Environmental variable is for every one and user is for specific user.Then i wish to add user variable in my application packaging only for one user ie user 1 then in scripting part how should i write any idea.
    • Are you using KACE or SCCM? Do you have control over Group Policy?

Community Chosen Answer

 i wish to add user variable in my application packaging only for one user
Google John McFadyen's article on self-healing.
Answered 06/13/2017 by: anonymous_9363
Red Belt

  • You can use a Custom Action to do that, that will execute in user context at install/reinstall. The custom action will be a vbs that checks the username and if condition is true, sets the variable. Also put in a user specific info in the package so when you launch the shortcut( advertised shortcut) it will go into self-healing and execute the CA. If you don't have shortcuts - use ActiveSetup.

All Answers

There is no need whatsoever to use a CA to add environment variables. The Environment table exists for that very purpose, although, as the data ends up in the registry, I use the Registry table.
Answered 06/16/2017 by: anonymous_9363
Red Belt

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