gpt4 book ai didi

registry - 卸载程序不删除注册表

转载 作者:行者123 更新时间:2023-12-03 01:59:19 25 4
gpt4 key购买 nike

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

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

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

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

Post 部分在 Windows 64 位注册 TableView 中创建注册表项,但卸载程序不会删除该注册表项。

如果我删除对 64 位操作系统的检查,则在 Wow6432Node 中创建和删除注册表可以正常工作。

最佳答案

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

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

使用Process Monitor调查其他注册表问题...

关于registry - 卸载程序不删除注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8571900/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com