NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Wed
20
Jun '07

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(“Software\Microsoft\Windows\CurrentVersion\Uninstall”,RegistryKeyPermissionCheck::ReadSubTree,System::Security::AccessControl::RegistryRights::FullControl);
 
					 array<string ^,1>^ rksubkeynames = rkprograms->GetSubKeyNames();
				 for (int i=0;i<rksubkeynames ->Length;i++) {
					 Object ^app = rkprograms->OpenSubKey(rksubkeynames[i])->GetValue(“DisplayName”);
					 if (app) {
						listBox1->Items->Add(app);
					 }
				 }</rksubkeynames></string>
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Trivandrum Microsoft Users Group Community Website