# Managed Object - GuestWindowsRegistryManager(vim.vm.guest.WindowsRegistryManager)

Property of
  GuestOperationsManager
See also
  GuestAuthentication, GuestRegKeyNameSpec, GuestRegKeyRecordSpec, GuestRegValueNameSpec, GuestRegValueSpec, VirtualMachine
Since
  vSphere API 6.0

## Managed Object Description

WindowsRegistryManager is the managed object that provides APIs to manipulate the Registry in a Windows guest OS.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
CreateRegistryKeyInGuest, DeleteRegistryKeyInGuest, DeleteRegistryValueInGuest, ListRegistryKeysInGuest, ListRegistryValuesInGuest, SetRegistryValueInGuest

# CreateRegistryKeyInGuest(createRegistryKey)

Create a registry key.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
keyName | GuestRegKeyNameSpec | The path to the registry key to be created.
isVolatile | xsd:boolean | If true, the key is created in memory and is not preserved across system reboot. Otherwise, it shall persist in the file system.
classType* | xsd:string | User defined class type for this key. May be omitted.

*Need not be set P Required privilege: VirtualMachine.GuestOperations.Modify

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyAlreadyExists | Thrown if the registry key already exists.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
GuestRegistryKeyParentVolatile | Thrown if trying to create a non-volatile registry subkey under a volatile registry parent key.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="CreateRegistryKeyInGuest" type="sms:CreateRegistryKeyInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="CreateRegistryKeyInGuestResponse"> <complexType/> </element>

# DeleteRegistryKeyInGuest(deleteRegistryKey)

Delete a registry key.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
keyName | GuestRegKeyNameSpec | The path to the registry key to be deleted.
recursive | xsd:boolean | If true, the key is deleted along with any subkeys (if present). Otherwise, it shall only delete the key if it has no subkeys.

P Required privilege: VirtualMachine.GuestOperations.Modify

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyHasSubkeys | Thrown if the parameter recursive is false and the key has subkeys.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DeleteRegistryKeyInGuest" type="sms:DeleteRegistryKeyInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DeleteRegistryKeyInGuestResponse"> <complexType/> </element>

# DeleteRegistryValueInGuest(deleteRegistryValue)

Delete a registry value.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
valueName | GuestRegValueNameSpec | The registry value name to be deleted. The Value "name" (specified in GuestRegValueNameSpec) can be empty. If "name" is empty, it deletes the value for the unnamed or default value of the given key.

P Required privilege: VirtualMachine.GuestOperations.Modify

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
GuestRegistryValueNotFound | Thrown if the registry value was not found.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DeleteRegistryValueInGuest" type="sms:DeleteRegistryValueInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DeleteRegistryValueInGuestResponse"> <complexType/> </element>

# ListRegistryKeysInGuest(listRegistryKeys)

List all registry subkeys for a given registry key.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
keyName | GuestRegKeyNameSpec | The path to the registry key for which all subkeys are to be listed.
recursive | xsd:boolean | If true, all subkeys are listed recursively.
matchPattern* | xsd:string | A filter for the key names returned, specified using perl-compatible regular expressions. If matchPattern is unset, then the pattern '.*' is used, which returns all key names found, otherwise only those key names that match the input pattern shall be returned.

*Need not be set P Required privilege: VirtualMachine.GuestOperations.Query

Return Value

Type | Description
--- | ---
GuestRegKeyRecordSpec[] | The list of subkeys is returned in an array of GuestRegKeySpec structures.

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ListRegistryKeysInGuest" type="sms:ListRegistryKeysInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ListRegistryKeysInGuestResponse"> <complexType> <sequence> <element name="returnval" type="sms:GuestRegKeyRecordSpec" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# ListRegistryValuesInGuest(listRegistryValues)

List all registry values for a given registry key.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
keyName | GuestRegKeyNameSpec | The path to the registry key for which all values are to be listed.
expandStrings | xsd:boolean | If true, all values that have expandable data such as environment variable names, shall get expanded in the result.
matchPattern* | xsd:string | A filter for the value names returned, specified using perl-compatible regular expressions. If matchPattern is unset, then the pattern '.*' is used, which returns all value names found, otherwise only those value names that match the input pattern shall be returned.

*Need not be set P Required privilege: VirtualMachine.GuestOperations.Query

Return Value

Type | Description
--- | ---
GuestRegValueSpec[] | The list of values is returned in an array of GuestRegValueSpec structures.

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ListRegistryValuesInGuest" type="sms:ListRegistryValuesInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ListRegistryValuesInGuestResponse"> <complexType> <sequence> <element name="returnval" type="sms:GuestRegValueSpec" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# SetRegistryValueInGuest(setRegistryValue)

Set/Create a registry value.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestWindowsRegistryManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual machine to perform the operation on.
auth | GuestAuthentication | The guest authentication data.
value | GuestRegValueSpec | The information for the registry value to be set/created. The Value "name" (specified in GuestRegValueNameSpec) and the Value "data" (specified in GuestRegValueSpec) can both be empty. If "name" is empty, it sets the value for the unnamed or default value of the given key.

P Required privilege: VirtualMachine.GuestOperations.Modify

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the program path cannot be run because the guest authentication will not allow the operation.
GuestRegistryKeyInvalid | Thrown if the registry key is not valid. Check the HKEY Root specified.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="SetRegistryValueInGuest" type="sms:SetRegistryValueInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="SetRegistryValueInGuestResponse"> <complexType/> </element>