Jump to content
Fórum Script Brasil
  • 0

Não é possível buscar valores no regisrto no VB2010


serginho450
 Share

Question

Olá a todos.

Preciso visualizar o valor da cahve do registro "HKEY­_LOCAL_MACHINE\HARDWARE\DESCRIPTION\SYST­EM\CentralProcessor\0\ProcessorNameString" em uma MsgBox como faço? Já tentei o seguinte comando:

        Dim CPUName As String
        CPUName = My.Computer.Registry.GetValue("HKEY­_LOCAL_MACHINE\HARDWARE\DESCRIPTION\SYST­EM\CentralProcessor\0", "ProcessorNameString", Nothing)
        MsgBox(CPUName)

Mas não retorna nada, será que tenho que fazer alguma referência?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Conseguí resolver e se alguém tiver o mesmo problema, segue como resolví

  Dim CpuName As String
 Dim sysinfo As String
        CpuName = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", Nothing)
                sysinfo = vbNewLine + "OS Name: " + My.Computer.Info.OSFullName + vbNewLine + "OS Version: " + My.Computer.Info.OSVersion + vbNewLine + "Computer Name: " + My.Computer.Name + vbNewLine + "CPU: " + CpuName + vbNewLine + "RAM: " + ((My.Computer.Info.TotalPhysicalMemory) / 1024 / 1024 / 1024).ToString
MsgBox(sysinfo)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...