Jump to content
Sign in to follow this  
Allegro

Adding / Changing Environment variables

Recommended Posts

Is there a way to access the Environment Variables and add new ones or modify the User and System sections? Same as going to My Computer | Advanced | Environment Variables...

Thanks

Share this post


Link to post
Share on other sites

Is there a way to access the Environment Variables and add new ones or modify the User and System sections? Same as going to My Computer | Advanced | Environment Variables...

Thanks

Hi,

Try looking at the registry keys:

HKCU\Environment

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

And RegRead/RegWrite

alien13

[Edit]: Heh, JBeef beat me to it :)

Edited by alien13

Share this post


Link to post
Share on other sites

Thanks guys for the input. I will have a look at it shortly.

I am not familiar with the registry, but do need to add User Variables for an automated software install using Autoit.

If any one has an example showing how to add a Variable and Value to the User Environment settings, it would be appreciated.

Variable : CDS_SITE

Value: C:\Software\install

Thanks.

Share this post


Link to post
Share on other sites

Thanks guys for the input. I will have a look at it shortly.

I am not familiar with the registry, but do need to add User Variables for an automated software install using Autoit.

If any one has an example showing how to add a Variable and Value to the User Environment settings, it would be appreciated.

Variable : CDS_SITE

Value: C:\Software\install

Thanks.

Hey,

Here is an example of importing the above data into the User Variables:

RegWrite("HKCU\Environment", "CDS_SITE", "REG_SZ", "C:\Software\Install")
MsgBox(64, "Done!", "Finished!")

alien13

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...