The regDeleteKey function removes a key and all associated values from the registry on the local system or a remote system. If the specified key contains subkeys, the removal fails by default. However by passing true for fRecurse the function deletes sKey including all nested subkeys.
The function has the following syntax:
regDeleteKey(sKey [, fRecurse])
Specifies the registry key
Deletes nested subkeys.
If the function fails, it raises an exception. Otherwise it returns true.
Examples
Delete key named "Settings" from HKLM\Software\ACME with error handling:
try { regDeleteKey("HKLM\\Software\\ACME\\Settings"); ? "Success" } catch(e) { ? "Failure:", e }
Delete "Settings" key forcing recursive delete of subkeys:
regDeleteKey("HKLM\\Software\\ACME\\Settings", true);
Delete "Settings" key on remote machine client8:
regDeleteKey("client8::HKLM\\Software\\ACME\\Settings");
Copyright © 2013 CA. All rights reserved. |
|