我开发了一个安装程序类,它从基础目录中删除某些文件夹。但是,我还想通过inst类从添加/删除程序中删除另一个应用程序的条目。有人建议解决方案。
此致 苛刻的苏曼
答案 0 :(得分:4)
从HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall
中删除注册表中的条目答案 1 :(得分:2)
此外,可能还有一个需要从HKEY_CLASSES_ROOT \ Installer \ Products中删除的条目
答案 2 :(得分:1)
可能值得阅读此论坛帖子: http://www.eggheadcafe.com/community/aspnet/2/10069013/uninstall-a-proram-by-using-c.aspx
答案 3 :(得分:1)
public static void RemoveControlPanelProgram(string apllicationName)
{
string InstallerRegLoc = @"Software\Microsoft\Windows\CurrentVersion\Uninstall";
RegistryKey homeKey = (Registry.LocalMachine).OpenSubKey(InstallerRegLoc, true);
RegistryKey appSubKey = homeKey.OpenSubKey(apllicationName);
if (null != appSubKey)
{
homeKey.DeleteSubKey(apllicationName);
}
}