testlink.nsi 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ;InstallOptions Test Script
  2. ;Written by Ramon
  3. ;This script demonstrates the power of the new control "LINK"
  4. ;that allows you to execute files, send mails, open wepsites, etc.
  5. ;--------------------------
  6. !define TEMP1 $R0 ;Temp variable
  7. ;The name of the installer
  8. Name "InstallOptions Test Link"
  9. ;The file to write
  10. OutFile "TestLink.exe"
  11. ; Show install details
  12. ShowInstDetails show
  13. ;Things that need to be extracted on startup (keep these lines before any File command!)
  14. ;Only useful for BZIP2 compression
  15. ;Use ReserveFile for your own InstallOptions INI files too!
  16. ReserveFile /plugin InstallOptions.dll
  17. ReserveFile "testlink.ini"
  18. ;Order of pages
  19. Page custom SetCustom
  20. Page instfiles
  21. Section "Components"
  22. ;Get Install Options dialog user input
  23. SectionEnd
  24. Function .onInit
  25. ;Extract InstallOptions files
  26. ;$PLUGINSDIR will automatically be removed when the installer closes
  27. InitPluginsDir
  28. File /oname=$PLUGINSDIR\test.ini "testlink.ini"
  29. WriteIniStr $PLUGINSDIR\test.ini "Field 2" "State" "$WINDIR\Notepad.exe"
  30. FunctionEnd
  31. Function SetCustom
  32. ;Display the InstallOptions dialog
  33. Push ${TEMP1}
  34. InstallOptions::dialog "$PLUGINSDIR\test.ini"
  35. Pop ${TEMP1}
  36. Pop ${TEMP1}
  37. FunctionEnd