读书人

怎么用VBS访问Windows7注册表

发布时间: 2012-01-20 18:53:53 作者: rapoo

如何用VBS访问Windows7注册表
Script: D:\Test\init.vbs
Line: 6
Char: 1
Error: Invalid root in registry key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet001\Control\Session Manager\Environment\".
Code: 80070005 (Access Denied)
Source: WshShell.RegWrite

----------------------------------

myPath = "this is my path"

Set WshShell = WScript.CreateObject("WScript.Shell")
RegPath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"
WshShell.RegWrite RegPath & "myPath", myPath, "REG_SZ"


[解决办法]
权限不够,被拒绝了
[解决办法]

探讨
怎么办?我是administrators组的

读书人网 >windows

热点推荐