home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / pserv.cpl / pserv-2.4.exe / source / pserv.nsi < prev    next >
Text File  |  2005-01-05  |  3KB  |  118 lines

  1.  
  2. !include "MUI.nsh"
  3.  
  4. Name "pserv.cpl 2.4"
  5. OutFile "pserv-2.4.exe"
  6.  
  7. Caption "pserv.cpl - Version 2.4"
  8.  
  9. BGGradient 0066CC FF4444 FFFFFF
  10.  
  11. LicenseData .\license.txt
  12.  
  13. InstType "Full (w/ Source)"
  14. InstType "Normal (w/o Source)"
  15.  
  16. ShowInstDetails show
  17. ShowUninstDetails show
  18. SetOverwrite on
  19. SetDateSave on
  20. SetCompressor bzip2
  21. BrandingText p-nand-q.com
  22.  
  23. InstallDir "$PROGRAMFILES\p-nand-q.com\pserv.cpl"
  24. InstallDirRegKey HKCU "SOFTWARE\p-nand-q.com\pserv.cpl" ""
  25.   !define MUI_ABORTWARNING
  26.  
  27.  
  28.   !insertmacro MUI_PAGE_WELCOME
  29.   !insertmacro MUI_PAGE_LICENSE license.txt
  30.   !insertmacro MUI_PAGE_COMPONENTS
  31.   !insertmacro MUI_PAGE_DIRECTORY
  32.   !insertmacro MUI_PAGE_INSTFILES
  33.   !insertmacro MUI_PAGE_FINISH
  34.   
  35.   !insertmacro MUI_UNPAGE_WELCOME
  36.   !insertmacro MUI_UNPAGE_CONFIRM
  37.   !insertmacro MUI_UNPAGE_INSTFILES
  38.   !insertmacro MUI_UNPAGE_FINISH
  39.   
  40. ;--------------------------------
  41. ;Languages
  42.  
  43.   !insertmacro MUI_LANGUAGE "English"
  44.  
  45. !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
  46.  
  47. Section "pserv.cpl (required)" SecCore
  48.     SectionIn 1 2 RO
  49.     
  50.     ; set output path to system directory.
  51.     SetOutPath $SYSDIR
  52.     File "DATA\pserv.cpl"
  53.     
  54.     ; Set output path to the installation directory.
  55.     SetOutPath $INSTDIR
  56.     
  57.     ; Put file there
  58.     File "DATA\pserv2.exe"
  59.     
  60.     ; Write the installation path into the registry
  61.     WriteRegStr HKCU "SOFTWARE\p-nand-q.com\pserv.cpl" "Install_Dir" "$INSTDIR"
  62.     
  63.     ; Write the uninstall keys for Windows
  64.     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pserv.cpl" "DisplayName" "pserv.cpl (remove only)"
  65.     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pserv.cpl" "UninstallString" '"$INSTDIR\uninstall.exe"'
  66.         
  67.     WriteUninstaller "uninstall.exe"
  68. SectionEnd
  69.  
  70. Section "Sourcecode" SecSource
  71.     SectionIn 1
  72.     
  73.     SetOutPath $INSTDIR\source
  74.     FILE /R "source\*" 
  75. SectionEnd
  76.  
  77. Section "Start Menu Shortcuts" SecIcons
  78.     SectionIn 1 2
  79.     SetOutPath $INSTDIR
  80.     CreateDirectory "$SMPROGRAMS\pserv.cpl"
  81.     CreateShortCut "$SMPROGRAMS\pserv.cpl\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  82.     CreateShortCut "$SMPROGRAMS\pserv.cpl\Services & Devices.lnk" "$INSTDIR\pserv2.exe" "" "$INSTDIR\pserv2.exe" 0
  83.     
  84. SectionEnd
  85.  
  86. !ifndef CLASSIC_UI
  87.  
  88. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  89.   !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The pserv.cpl applet and support files"
  90.   !insertmacro MUI_DESCRIPTION_TEXT ${SecSource} "The complete sourcecode with instructions"
  91.   !insertmacro MUI_DESCRIPTION_TEXT ${SecIcons} "Adds icons to your start menu for easy access"
  92. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  93.  
  94. !endif
  95.  
  96. Section Uninstall
  97.     
  98.     ; remove registry keys
  99.     DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pserv.cpl"
  100.     DeleteRegKey HKCU SOFTWARE\p-nand-q.com\pserv.cpl
  101.     ; remove files
  102.     
  103.     Delete $SYSDIR\pserv.cpl
  104.     Delete $INSTDIR\pserv2.exe
  105.     RMDIR /R $INSTDIR\source
  106.     
  107.     ; MUST REMOVE UNINSTALLER, too
  108.     Delete $INSTDIR\uninstall.exe
  109.     
  110.     ; remove shortcuts, if any.
  111.     Delete "$SMPROGRAMS\pserv.cpl\*.*"
  112.     ; remove directories used.
  113.     RMDir "$SMPROGRAMS\pserv.cpl"
  114.     RMDir "$INSTDIR"
  115.  
  116.  
  117. SectionEnd
  118.