vbs 更改环境变量
程序员文章站
2022-03-21 11:01:37
更改 复制代码 代码如下: set wshshell = wscript.createobject("wscript.shell") wshshell.environmen...
更改
set wshshell = wscript.createobject("wscript.shell")
wshshell.environment("user").item("path")="c:\ruby"
移除:
wshshell.environment("user").remove("last_login_date")
附记一下这两个:
set objad = createobject("adsysteminfo")
wscript.echo "your computer name is " & objad.computername
wscript.echo "your username is " & objad.username
wscript.echo("hello")
wscript.interactive = false
wscript.echo("this wont display")
wscript.interactive = true
wscript.echo("this will display")
复制代码 代码如下:
set wshshell = wscript.createobject("wscript.shell")
wshshell.environment("user").item("path")="c:\ruby"
移除:
复制代码 代码如下:
wshshell.environment("user").remove("last_login_date")
附记一下这两个:
复制代码 代码如下:
set objad = createobject("adsysteminfo")
wscript.echo "your computer name is " & objad.computername
wscript.echo "your username is " & objad.username
wscript.echo("hello")
wscript.interactive = false
wscript.echo("this wont display")
wscript.interactive = true
wscript.echo("this will display")
上一篇: 可以将Bat转换位VBS文件的VBS脚本
下一篇: 煮汤圆还要加糖吗?