如何用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"
[解决办法]
权限不够,被拒绝了
[解决办法]