Results 1 to 2 of 2

Thread: Help with registry

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    1

    Lightbulb Help with registry

    Hi. Iam new here, and also new to programming and visual basic. And i need little help with registry. I want to get every single registry Name and value, which lies in HKEY_CURRENT_USER....Run(for getting and THEN deleting them to prevent run those programs at windows start). This is just for getting names.
    Code:
    Imports Microsoft.Win32
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim registry As Object
            Dim registry_name As Object
    
            Dim registry_name_x As String
            registry = CreateObject("WScript.Shell")
    
            Dim rk As RegistryKey = registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", False)
            For Each rk In registry
                registry_name = rk.GetSubKeyNames
                registry_name_x = CInt(registry_name)
                MsgBox(rk)
            Next rk
        End Sub
    
    End Class
    Well, this isnt working, when i run it in the vb and click button, it says system missing member exception: IWshShell3 hasnt been found.
    I would appreciate help. Thank you.

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Help with registry

    This is where you start for reading/writing to the registry: My.Computer.Registry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width