卸载程序不删除注册表

编程入门 行业动态 更新时间:2024-10-27 20:38:35
本文介绍了卸载程序不删除注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 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...

更多推荐

卸载程序不删除注册表

本文发布于:2023-11-03 14:32:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555366.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:注册表   程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!