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
邮政部生成注册表进入Windows 64b它是注册表视图,但卸载程序不会删除注册表项。
如果我删除了对64位操作系统的检查,那么在Wow6432Node中注册表的创建和删除工作正常。
你安装一个应用程序的x64? – Anders 2011-12-20 08:26:55
请格外小心。您在工作时会看到一个预览图,并且有一个工具栏可以帮助您处理大部分格式。我已经修复了它,但它仍然需要工作。 – 2011-12-20 08:30:12
我希望卸载程序不会删除注册表;-) – 2011-12-20 08:30:55