Registry on a Hyper-V VM
If I already asked this I cannot find the question, sorry.
If I try to get values from the registry from a program running on a Hyper V client VM I'm presented with the values of the host machine.
Code:
Get Create (RefClass(cRegistry)) to hoRegistry
Set phRootKey of hoRegistry to HKEY_LOCAL_MACHINE
Set pfAccessRights of hoRegistry to Key_Read
Move "SOFTWARE\Microsoft\Windows NT\CurrentVersion" to sKey
Get KeyExists of hoRegistry sKey to bExists
If bExists Begin
Get OpenKey of hoRegistry sKey to bOpened
If bOpened Begin
If (ValueExists(hoRegistry,"ProductName")) Begin
Get ReadString of hoRegistry "ProductName" to sProductName
etc etc
Returns 'Windows 10 Enterprise' both on the host and on the VM. But directly looking on the VM with REGEDIT correctly show 'Windows 10 Professional'
Is this a limitation of the cRegistry class or is there a trick I am missing?
I should be on a beach ...