Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不想更改/设置权限,我只想检查用户是否有权更改注册表值。提前致谢。
可能重复的问题。无论如何,在答案中有一个链接,但是为了简化您的编码,您可以进行错误捕获并测试结果。
On Error Resume Next 'try to write "test"-key here... 'delete your "test"-key as well If Err.Number <> 0 Then WScript.Echo "no permission" Else WScript.Echo "have permission" End If On Error GoTo 0