installer.nsh 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ; RequestExecutionLevel admin
  2. !macro preInit
  3. SetRegView 64
  4. WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\gyrz"
  5. WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\gyrz"
  6. SetRegView 32
  7. WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\gyrz"
  8. WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\gyrz"
  9. ; CreateDirectory $%USERPROFILE%\*mentalEfficiencyData*
  10. ; CopyFiles $INSTDIR\user.config $%USERPROFILE%\*mentalEfficiencyData*
  11. ${If} ${FileExists} $%USERPROFILE%\*mentalEfficiencyData*
  12. ; file is a directory 如果目录存在就不执行
  13. ; SetOutPath $%USERPROFILE%\*mentalEfficiencyData*
  14. ; File $%USERPROFILE%\3.txt
  15. ; CopyFiles $%USERPROFILE%\3.txt $%USERPROFILE%\*mentalEfficiencyData*
  16. ${Else}
  17. ;如果目录不存在就执行创建copy动作
  18. ;CreateDirectory $INSTDIR\*mentalEfficiencyData*
  19. ;CreateDirectory $%USERPROFILE%\*mentalEfficiencyData*
  20. ; SetOutPath $%USERPROFILE%\*mentalEfficiencyData*
  21. ; File /r user.config
  22. ; File $INSTDIR\exe\mysql\mysql-5.7.24-winx64\Data\ibdata1
  23. ; CopyFiles user.config $%USERPROFILE%\*mentalEfficiencyData*
  24. ;CopyFiles $%USERPROFILE%\3.txt $%USERPROFILE%\*mentalEfficiencyData*
  25. ; Delete $INSTDIR\user.config
  26. ${EndIf}
  27. !macroend
  28. ; !macro customUnInstall
  29. ; nsExec::Exec '"C:\Windows\System32\cmd.exe" sc stop psychological'
  30. ; nsExec::Exec '"C:\Windows\System32\cmd.exe" sc delete psychological'
  31. ; !macroend
  32. !macro customUnInit
  33. ; 卸载页面出现前执行
  34. # 提示窗
  35. nsExec::Exec "sc stop ct" "" "SW_HIDE"
  36. nsExec::Exec "sc delete ct" "" "SW_HIDE"
  37. nsExec::Exec "taskkill /f /im rpc_thrift.exe" "" "SW_HIDE"
  38. ; ExecWait "sc stop psychological"
  39. ; ExecWait "sc delete psychological"
  40. ; ExecWait "taskkill /f /im rpc_thrift.exe"
  41. ; MessageBox MB_OKCANCEL "是否删除用户数据?" IDOK label_ok IDCANCEL label_cancel
  42. ; label_ok:
  43. ; # 删除固定文件夹
  44. ; RMDir /r $PROFILE\iConfig_TEST
  45. ; Goto end
  46. ; label_cancel:
  47. ; Goto end
  48. ; end:
  49. !macroend