2013-02-26 87 views

回答

0

可能duplicate question。無論如何,在答案中你有一個link,但爲了簡化你的編碼,你可以做錯誤捕獲和測試結果。

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