Another method I tried is this:
It will return key does not exist and error code number is 0... so that's useless... key DOES exist... but user has no access to it.
On Error resume next If oReg.EnumKey(HKEY_LOCAL_MACHINE, "SECURITY\", "", "") = 0 Then MsgBox "Key Exists" wscript.echo err.number Else MsgBox "Key Not Found" wscript.echo err.number End If
It will return key does not exist and error code number is 0... so that's useless... key DOES exist... but user has no access to it.