Check if application is installed in registry

前端 未结 7 602
庸人自扰
庸人自扰 2020-12-01 21:07

Right now I use this to list all the applications listed in the registry for 32bit & 64. I have seen the other examples of how to check if an application is installed wi

7条回答
  •  离开以前
    2020-12-01 21:35

    The solution @Hyperion is ok but it has an error because for 32 bit configurations. No 64 bit registers are returned. To receive 64 bit registers, do the following:

    string registryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
    RegistryKey key64 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
    RegistryKey key = key64.OpenSubKey(registryKey);
    

提交回复
热议问题