This function adds a new registry key to the organisation node.
object.AddRegistryKey(aKeyCode, aKeyValue)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISOrgMember interface |
|
aKeyCode |
In, Required | string |
The code of the registry key |
aKeyValue |
In, Required | string |
The value of the registry key |
Add a new registry key with the selected code and value to the organisation node.
Dim aFilter
Dim aOrgMember
Dim aOrgMembers
Dim aAllRegKeys
Dim aRegKey
Dim aMessage
aRegKeyShortCode = "TESTKEY2"
'the code of the short code from category "Registry (Organisation)"
Set aFilter = Profile.CreateOrgMembersFilter
set aOrgMembers = Profile.LoadOrgMembers(aFilter)
aMessage = "Org Nodes Count = " & aOrgMembers.Count
for each aOrgMember in aOrgMembers
set aAllRegKeys = aOrgMember.GetRegistryKeys
aMessage = aMessage & vbNewLine & " Registry Keys Count = " & aAllRegKeys.Count
set aRegKey = aOrgMember.AddRegistryKey(aRegKeyShortCode, "NiceValue")
if not aRegKey is nothing then
aMessage = aMessage & vbNewLine & "New Registry Key was created successfully " &_
"( Id= " & aRegKey.Id & ", KeyValue = " & aRegKey.KeyValue & " )"
end if
next
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Registry Key can be found and added in
.