The regCreateKey function creates a key or a key hierarchy under the registry key specified by sKeyParent on the local system or a remote system.
This function has the following syntax:
regCreateKey(sKeyParent, sKey)
Specifies the parent key.
Defines the new key
If the function fails, it raises an exception. Otherwise it returns true. The function succeeds if the specified key or part of a key hierarchy exists.
Examples
Create key ACEM under the local machine SOFTWARE key with error handling:
try { regCreateKey("HKLM\\SOFTWARE", "ACME"); ? "Success" } catch(e) { ? "Failure", e }
Create a key hierarchy:
regCreateKey("HKLM\\SOFTWARE", "ACME\\HOME");
Create key ACEM on remote machine client8:
regCreateKey("client8::HKLM\\SOFTWARE", "ACME");
Copyright © 2013 CA. All rights reserved. |
|