IObjectSecurity Method: AttachRegistryKey

AttachRegistryKey
(
 RegistryKeyPath As String,
 [HostComputer]  As Variant,
 [DontSave] As Variant,
 [TakeOwnerShip] As Variant
);

Parameters

[in] String RegistryKeyPath
Path of the registry key ("HKLM\Software") whose security has to be read.

[in] Variant HostComputer
This is an optional parameter. The computer from where the registry is to be read. If this is not specified, the local computer is used.

[in] Variant DontSaveChanges
This is an optional parameter. This flag indicates whether the operations done on an object should be saved to the disk. If TRUE is specified, the operations will not be committed. By default, changes are saved.

[in] Variant TakeOwnerShip
This is an optional parameter. This flag indicates whether the "Take ownership" operation should be tried if an "Access Denied" error is encountered while reading the security of the registry key with the current user being the owner of the file.

Description
Initializes the ObjectSecurity object with the security of the specified registry key.

Example

Dim ObjSec As IObjectSecurity
Set ObjSec = CreateObject("DirectScript.ObjectSecurity")
'Attach to the registrykey "HKEY_CURRENT_USER\RemoteAccess" on the computer MOON.
ObjSec.AttachRegistryKey "HKEY_CURRENT_USER\RemoteAccess", "MOON"

 

See Also

508 Resource Limit Is Reached

Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.