guangdian.nsi 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ; Script generated by the HM NIS Edit Script Wizard.
  2. ; HM NIS Edit Wizard helper defines
  3. !define PRODUCT_NAME "sproxy"
  4. !define EXE_NAME "奈油.exe"
  5. !define CORE_NAME "SVProxy.exe"
  6. !define PRODUCT_NAME_KJ "SVProxy"
  7. !define PRODUCT_VERSION "1.0.0"
  8. !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${EXE_NAME}"
  9. !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
  10. !define PRODUCT_UNINST_ROOT_KEY "HKLM"
  11. ; MUI 1.67 compatible ------
  12. !include "MUI.nsh"
  13. ; MUI Settings
  14. !define MUI_ABORTWARNING
  15. !define MUI_ICON "image\soui.ico"
  16. !define MUI_UNICON "image\soui.ico"
  17. ; Welcome page
  18. !insertmacro MUI_PAGE_WELCOME
  19. ; Directory page
  20. !insertmacro MUI_PAGE_DIRECTORY
  21. ; Instfiles page
  22. !insertmacro MUI_PAGE_INSTFILES
  23. ; Finish page
  24. !define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE_NAME}"
  25. !insertmacro MUI_PAGE_FINISH
  26. ; Uninstaller pages
  27. !insertmacro MUI_UNPAGE_INSTFILES
  28. ; Language files
  29. !insertmacro MUI_LANGUAGE "SimpChinese"
  30. ; MUI end ------
  31. Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  32. OutFile "${PRODUCT_NAME}.exe"
  33. InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
  34. InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
  35. ShowInstDetails show
  36. ShowUnInstDetails show
  37. Section "!Files" "des_files"
  38. SetOutPath $INSTDIR
  39. #CreateShortCut "$DESKTOP\aa.lnk" "$INSTDIR\code.exe"
  40. #CreateShortCut "$DESKTOP\${EXE_NAME}.lnk" "$INSTDIR\${CORE_NAME}"
  41. File /r "${PRODUCT_NAME}\*.*"
  42. CreateShortCut "$DESKTOP\${EXE_NAME}.lnk" "$INSTDIR\${CORE_NAME}"
  43. SectionEnd
  44. Section "-Necessary"
  45. WriteUninstaller "$INSTDIR\uninst.exe"
  46. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}"
  47. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$INSTDIR\uninst.exe"
  48. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}"
  49. #WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "$INSTDIR\${PRODUCT_PUBLISHER}"
  50. SectionEnd
  51. Function un.onUninstSuccess
  52. HideWindow
  53. MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) 已成功地从你的算机移?"
  54. FunctionEnd
  55. Function un.onInit
  56. MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "你确实完全移 $(^Name) ,其及所有的组件?" IDYES +2
  57. Abort
  58. FunctionEnd
  59. Section "Uninstall"
  60. SetShellVarContext current
  61. Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk"
  62. Delete "$SMPROGRAMS\${PRODUCT_NAME}\卸载?{PRODUCT_NAME}.lnk"
  63. RMDir "$SMPROGRAMS\${PRODUCT_NAME}\"
  64. Delete "$DESKTOP\${EXE_NAME}.lnk"
  65. SetOutPath "$INSTDIR"
  66. Delete "$INSTDIR\*.*"
  67. SetOutPath "$DESKTOP"
  68. RMDir /r "$INSTDIR"
  69. RMDir "$INSTDIR"
  70. SetAutoClose true
  71. SectionEnd