vSphere

 View Only
  • 1.  APIs to get Windows Product Key from Windows Virtual Machine

    Posted Nov 18, 2008 05:02 PM

    hi,

    I just wanted to know the API to get information about product key / serial key of Windows Guest OS running as Virtual Machine?

    Thanks,

    Manu



  • 2.  RE: APIs to get Windows Product Key from Windows Virtual Machine

    Posted Nov 20, 2008 03:22 AM

    (1) You can get it from the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId

    (2) Or you can get it via WMI. http://msdn.microsoft.com/en-us/library/cc534596(VS.85).aspx

    See this VBS as an example:

    c:\>slmgr.vbs -dli

    It is in your %SYSTEM32% directory.

    Hope this will help,

    Alex