添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
WriteRegExpandStr HKCR "*\shell ${MAIN_EXE_NAME} " "" "使用 ${MAIN_EXE_NAME} 打开" WriteRegExpandStr HKCR "*\shell ${MAIN_EXE_NAME} " "Icon" " $INSTDIR ${MAIN_EXE_NAME} .exe" WriteRegExpandStr HKCR "*\shell ${MAIN_EXE_NAME} \command" "" ` " $INSTDIR ${MAIN_EXE_NAME} .exe" "%V" `

2.2 卸载时删除注册表

DeleteRegKey HKLM " ${PRODUCT_DIR_REGKEY} " DeleteRegKey HKCR "*\shell ${MAIN_EXE_NAME} " DeleteRegKey HKCR "*\shell ${MAIN_EXE_NAME} \command"
  • nsis检测是否已安装此应用
  • #此处检测当前是否安装此应用 Call HandleAppInstall StrCpy 4 4 6 -10 IfFileExists 4 \uninst . e x e f o u n d S t r C p y 4\uninst.exe found StrCpy 6 "" DeleteRegValue P R O D U C T U N I N S T R O O T K E Y " {PRODUCT_UNINST_ROOT_KEY} "

      ${EndIf}
    

    ${EndIf}

    IfFileExists 用来判断文件路径下卸载程序是否还存在,如果存在就继续执行,不存在跳过