# 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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
keyName P | GuestRegKeyNameSpec | The path to the registry key to be created. Since vSphere API 6.0
isVolatile P | 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. Since vSphere API 6.0
classType* P | xsd:string | User defined class type for this key. May be omitted. Since vSphere API 6.0

*Need not be set PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="CreateRegistryKeyInGuest" type="vsan:CreateRegistryKeyInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" 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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
keyName P | GuestRegKeyNameSpec | The path to the registry key to be deleted. Since vSphere API 6.0
recursive P | 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. Since vSphere API 6.0

PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="DeleteRegistryKeyInGuest" type="vsan:DeleteRegistryKeyInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" 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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
valueName P | 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. Since vSphere API 6.0

PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="DeleteRegistryValueInGuest" type="vsan:DeleteRegistryValueInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" 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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
keyName P | GuestRegKeyNameSpec | The path to the registry key for which all subkeys are to be listed. Since vSphere API 6.0
recursive P | xsd:boolean | If true, all subkeys are listed recursively. Since vSphere API 6.0
matchPattern* P | 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. Since vSphere API 6.0

*Need not be set PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="ListRegistryKeysInGuest" type="vsan:ListRegistryKeysInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ListRegistryKeysInGuestResponse"> <complexType> <sequence> <element name="returnval" type="vsan: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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
keyName P | GuestRegKeyNameSpec | The path to the registry key for which all values are to be listed. Since vSphere API 6.0
expandStrings P | xsd:boolean | If true, all values that have expandable data such as environment variable names, shall get expanded in the result. Since vSphere API 6.0
matchPattern* P | 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. Since vSphere API 6.0

*Need not be set PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="ListRegistryValuesInGuest" type="vsan:ListRegistryValuesInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ListRegistryValuesInGuestResponse"> <complexType> <sequence> <element name="returnval" type="vsan: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. Since vSphere API 6.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 6.0
value P | 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. Since vSphere API 6.0

PRequired privilege - see tooltip for details

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:vsan="urn:vsan" name="SetRegistryValueInGuest" type="vsan:SetRegistryValueInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="SetRegistryValueInGuestResponse"> <complexType/> </element>