RegistryKey registrykeyHKLM = Registry.LocalMachine; string keyPath = @"Software\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{3BFAF362-6DB8-46EA-98BB-713388534EB1}"; RegistryKey rk2 = Registry.LocalMachine.CreateSubKey(keyPath); if (rk2 != null) { errlog.WriteLogMsg("Found the registry: " + keyPath); // Deleting uninstall registry key entries registrykeyHKLM.DeleteSubKey(keyPath); } rk2.Close(); registrykeyHKLM.Close(); //Checking for successful deletion of Uninstall registry keys try { RegistryKey rk = Registry.LocalMachine.OpenSubKey(keyPath,true); if (rk != null) { errlog.WriteLogMsg("Registry found. Unable to delete registry key: " + keyPath); errlog.WriteLogMsg("Failed to delete Uninstall Information Registry Entries!!!"); //MessageBox.Show("Failed to delete Uninstall Information Registry Entries!!!");//2.0.0 (DKD) } else { errlog.WriteLogMsg("Successfully deleted registry key: " + keyPath); } } catch (Exception ex1) { errlog.WriteLogMsg("Exception while deleting registry entries"); errlog.WriteErrorLog(ex1); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)