locked
Finding the Computer Id number

    Question

  • How can I access the computer Id number from the Computer? Is it even possible? I want the Number Displayed in the System Control Panel under the User name and computer name.

    thanks

    Tuesday, June 28, 2005 10:54 PM

All replies

  • The ID you are referring to can be found in the Registry under:

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
    in the key "ProductID"
    Tuesday, June 28, 2005 11:14 PM
  • P.S. You should be able to find lots of examples on the web on how to retrieve the Registry values in .Net, if you have trouble please post here.

    Thanks,
    Tyler
    Tuesday, June 28, 2005 11:15 PM
  • With the new MY namespace under Whidbey its real easy to extract these out of the registry

    Heres the two examples


    My
    .Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProductID", "")

    My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion").GetValue("ProductID", "")




    Friday, July 22, 2005 6:29 PM
  • Here is and example I found using a month back.

    http://www.programmersheaven.com/2/Les_VBNET_15_p1

    Tuesday, July 26, 2005 7:11 AM