installer.nsh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. !include "WinMessages.nsh"
  2. !include "WinCore.nsh"
  3. !include "WordFunc.nsh"
  4. !macro customHeader
  5. ShowUninstDetails show
  6. !macroend
  7. !macro customInstall
  8. WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run""XGOEdu" "$INSTDIR\XGOEdu.exe"
  9. nsExec::Exec ".\resources\ca.bat"
  10. ${ifNot} ${isUpdated}
  11. ; ${If} ${RunningX64}
  12. ; nsExec::Exec ".\python\python-3.4.bat"
  13. ; ${Else}
  14. ; nsExec::Exec ".\python\python-3.4-32.bat"
  15. ; ${EndIf}
  16. SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
  17. ${If} ${RunningX64}
  18. nsExec::Exec ".\cp210x_drivers\CP210xVCPInstaller_x64.bat"
  19. ${Else}
  20. nsExec::Exec ".\cp210x_drivers\CP210xVCPInstaller_x86.bat"
  21. ${EndIf}
  22. ${EndIf}
  23. SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
  24. ; ${If} ${RunningX64}
  25. ; nsExec::Exec '.\python\pipdownload.bat'
  26. ; ${Else}
  27. ; nsExec::Exec '.\python\pipdownload32.bat'
  28. ; ${EndIf}
  29. #nsExec::Exec 'cmd.exe /c del "$INSTDIR\resources\ca.bat" "$INSTDIR\resources\ca.crt" "$INSTDIR\python\python-3.8.0-amd64.bat" "$INSTDIR\python\python-3.8.0.bat" "$INSTDIR\cp210x_drivers\CP210xVCPInstaller_x64.bat" "$INSTDIR\cp210x_drivers\CP210xVCPInstaller_x86.bat"'
  30. !macroend
  31. !macro customUnInstall
  32. DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "XGOEdu"
  33. !macroend