IVMGuestOS::SetParameter method
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Sets a named parameter within the guest operating system.
Syntax
HRESULT SetParameter(
[in] BSTR inParameterName,
[in] BSTR inParameterValue
);
Parameters
-
inParameterName [in]
-
The parameter name. It must be between 1 and 255 characters in length and cannot contain a backslash (\) character.
-
inParameterValue [in]
-
The parameter value.
Return value
This method can return one of these values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
A parameter is not valid or not specified. |
|
The operation did not complete in a timely manner. |
|
The virtual machine (VM) is not running. |
|
The VM is paused. |
|
Integration components are not installed in this VM. |
|
An unexpected error has occurred. |
Remarks
The VM must be running and integration components must be installed when this method is invoked. This method is only supported for Windows-based guest operating systems.
With integration components installed, the following key is automatically added to the guest operating system's registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters
When the guest operating system starts, the following registry string values are populated in the Parameters key:
- HostName
- PhysicalHostName
- PhysicalHostNameFullyQualified
- VirtualMachineName
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
None supported |
End of client support |
Windows 7 |
Product |
Windows Virtual PC |
Header |
|
IID |
IID_IVMGuestOS is defined as 99fea0db-4880-499a-b6d8-73dff9bc91be |