卸载程序不删除注册表 [英] uninstaller not deleting registry

查看:67
本文介绍了卸载程序不删除注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Function Check32or64BitWindows
${If} ${RunningX64}
      strcpy $INSTDIR "$PROGRAMFILES64\${APP_FULL_PATH}" 
      SetRegView 64

${Else}
       SetRegView 32
       strcpy $INSTDIR "$PROGRAMFILES32\${APP_FULL_PATH}"
${EndIf}
FunctionEnd

如果检测到旧版本,则执行

If an older version is detected then I execute

ExecWait '"$INSTDIR\uninst.exe" /S' $0

我的卸载部分:

Section uninstall
!define APP_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_VENDOR} ${APP_NAME}"
!define APP_UNINST_ROOT_KEY "HKLM"
DeleteRegKey ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}"
SectionEnd

Section -Post
WriteRegStr ${APP_UNINST_ROOT_KEY} "${APP_UNINST_KEY}" "DisplayName" "${APP_FULL_NAME}"
SectionEnd

发布部分在 Windows 64 位注册表视图中创建注册表项,但卸载程序不会删除该注册表项.

Post section creates the registry entry in the windows 64bit registry view but uninstaller is not deleting the registry entry.

如果我取消了对 64 位操作系统的检查,那么 Wow6432Node 中注册表的创建和删除工作正常.

If I remove the check for 64bit OS, then creation and deletion of registry in Wow6432Node works correctly.

推荐答案

如果您不安装 x64 应用程序,则根本不应使用 SetRegView/$PROGRAMFILES64.

If you are not installing a x64 application you should not use SetRegView/$PROGRAMFILES64 at all.

如果您正在安装 x64 应用程序并且在安装过程中调用了 SetRegView 64,则还必须在卸载程序中调用 SetRegView 64.

If you are installing a x64 application and you called SetRegView 64 during install you also have to call SetRegView 64 in the uninstaller.

使用进程监视器调查其他注册表问题...

Use Process Monitor to investigate other registry issues...

这篇关于卸载程序不删除注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆