adding environment variables via GPO

  • Thread starter Thread starter ajay
  • Start date Start date
A

ajay

Hi,

I need to add some machine environment variables to a number of
machines, is there any way of doing this via GPO or logon script. all i
can find is user variables. SETX does allow but you have to have admin
rights so this is no good.

any help would be appreciated,

AJay
 
Hi AJay,

You can use startup script to change

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

for any system E.V.

br,
Denis
 
Hi,

I need to add some machine environment variables to a number of
machines, is there any way of doing this via GPO or logon script.

Sample of changing %temp%, just modify it to your settings.

---- set.adm ----
CLASS MACHINE

CATEGORY "Environment"
POLICY "Self dfined variables"
KEYNAME "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
PART "Set MyVar1 =" EDITTEXT
DEFAULT "MyValue1"
VALUENAME MyVar1 ; EXPANDABLETEXT
; add expandabletext if it can contain Variables itself
END PART
END POLICY
END CATEGORY

---- set.adm ----

HTH
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top