Get list of installed softwares with Managed C++
The below code is for listing installed softwares in a windows machine with Managed C++.
RegistryKey^ rk = RegistryKey::OpenRemoteBaseKey(RegistryHive::LocalMachine, System::Environment::MachineName);
RegistryKey^ rkprograms = rk->OpenSubKey(”SoftwareMicrosoftWindowsCurrentVersionUninstall”,RegistryKeyPermissionCheck::ReadSubTree,System::Security::AccessControl::RegistryRights::FullControl);
array^ rksubkeynames = rkprograms->GetSubKeyNames();
for (int i=0;iLength;i++) {
Object ^app = rkprograms->OpenSubKey(rksubkeynames[i])->GetValue(”DisplayName”);
if (app) {
listBox1->Items->Add(app);
}
}
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)












