0

When I check manually, I see below registry key in the reristry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{44FA2BAA-3C54-41D2-9F24-D0EE0131C695}_is1

But when I query all subkeys in my VB.NET program, I don't see {44FA2BAA-3C54-41D2-9F24-D0EE0131C695}_is1. My application gives totally different Subkeys. Am I missing something? Here is the source code.

   Dim regKey As RegistryKey
    regKey = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
    For Each subKeyName As String In regKey.GetSubKeyNames()
        If subKeyName.Contains("44FA2BAA") Then
           ' CONTROL NEVER COMES HERE 

        End If
    Next
codematrix
  • 1,571
  • 11
  • 35
  • 53
  • more there is a bug in your **code**, like maybe an unhandled access violation exception – Ňɏssa Pøngjǣrdenlarp Apr 26 '14 at 23:10
  • Updated the question with source code. – codematrix Apr 26 '14 at 23:15
  • 1
    Sure you are missing something. You forgot to tell us that you are running the 64-bit version of Windows. Reading the 32-bit registry keys is okay, just different. Otherwise a good reminder that you should *never* monkey with the registry, dragons live there. Use superuser.com to ask questions about it. – Hans Passant Apr 26 '14 at 23:28
  • @HansPassant: Yes, I am running 64-bit version of windows. Thanks. What change should I make in the code? – codematrix Apr 26 '14 at 23:29
  • 1
    Don't make any changes, it works fine. It is not "your" registry key, it belongs to a 64-bit program. Don't mess with it. If you want to visit Rome then you'll have to act like a Roman. Lots of questions around already that describe how to run as a 64-bit process. – Hans Passant Apr 26 '14 at 23:36

0 Answers0