Disabling your script is not possible and is not such a great idea either. It's not up to the script to decide whether it should be enabled or not. Cookie's suggestion is much better.
quote:
Originally posted by CookieRevised
You don't need to read it as a REG_BINARY if that binary string represents a DWORD (4 bytes). Just read it as a REG_DWORD in that case.
As such, a full blown registry libary for just checking 1 value is also very much over the top. Reading that registry key can also be done using the build-in regkey functions.
I fully agree with you, but the
RegRead function provided by WScript.Shell will return a VBArray of integers when reading from a REG_BINARY. It doesn't provide a way to override how the value is read, thus one will need to fall back on the Windows API functions to read as a different type. I don't know how a VBArray would look like in JScript though but it doesn't sound too great.