用于创建系统变量的脚本 [英] Script to create system variable

查看:77
本文介绍了用于创建系统变量的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想为下面创建一个脚本,并想知道是否有人可以提供帮助。我实际上迷失了尝试在网上搜索。



所以下面是我想要实现的,如果变量名称和值存在但不同,那么它应该编辑值:



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:



打开控件面板

转到系统

转到高级系统属性

然后环境变量

在系统变量中,单击添加

新变量名称:_JAVA_OPTIONS

新变量值:-Xmx512M

单击确定


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.

推荐答案

***无法将此作为评论***



你错了。您不编写所有UI界面步骤的脚本。您只需编写脚本来创建系统环境变量。用你选择的语言有更多的例子。
*** 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.


这篇关于用于创建系统变量的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆