Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am looking to create a script for the below and was wondering if anyone can assist. I am actually lost tried searching on web.

So below is what i want to achieve and if the variable name and value exists but is different then it should edit the value:

Quote:

Open the Control Panel
Go to System
Go to Advanced Systems Properties
Then Environment Variables
In System Variables, click Add
New Variable Name: _JAVA_OPTIONS
New Variable Value: -Xmx512M
Click OK


Any help be appreciated. Thanks

What I have tried:

tried searching on web and found command prompts solution but not what I am looking for.
Posted
Updated 26-Oct-16 15:09pm

1 solution

*** Unable to leave this as a comment ***

You're going about this wrong. You don't script all the UI interface steps. You just script creating the system environment variable. There are a ton more examples of doing that in the language of your choice.
 
Share this answer
 
Comments
Zakizawa 27-Oct-16 2:24am    
Thanks Dave for your reply. Yes i only wanted to script the variable steps. I just included all the steps. Any links for examples you found Which i can check. Thanks.
notjustme 28-Oct-16 14:59pm    
http://lmgtfy.com/?q=script+environment+variables+windows

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900