| 1 |
; CaptureClient-Setup.nsi |
|---|
| 2 |
|
|---|
| 3 |
;-------------------------------- |
|---|
| 4 |
|
|---|
| 5 |
; The name of the installer |
|---|
| 6 |
Name "Capture Client" |
|---|
| 7 |
|
|---|
| 8 |
; The file to write |
|---|
| 9 |
OutFile "CaptureClient-Setup.exe" |
|---|
| 10 |
|
|---|
| 11 |
; The default installation directory |
|---|
| 12 |
InstallDir $PROGRAMFILES\Capture |
|---|
| 13 |
|
|---|
| 14 |
;-------------------------------- |
|---|
| 15 |
|
|---|
| 16 |
; Pages |
|---|
| 17 |
|
|---|
| 18 |
;Page directory |
|---|
| 19 |
PageEx license |
|---|
| 20 |
LicenseText "GNU GENERAL PUBLIC LICENSE, v2" |
|---|
| 21 |
LicenseData COPYING |
|---|
| 22 |
PageExEnd |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
Page instfiles |
|---|
| 26 |
|
|---|
| 27 |
;UninstPage uninstConfirm |
|---|
| 28 |
UninstPage instfiles |
|---|
| 29 |
|
|---|
| 30 |
;-------------------------------- |
|---|
| 31 |
|
|---|
| 32 |
; The stuff to install |
|---|
| 33 |
Section "" |
|---|
| 34 |
;Set output path to the installation directory. |
|---|
| 35 |
SetOutPath $INSTDIR |
|---|
| 36 |
|
|---|
| 37 |
; Put file there |
|---|
| 38 |
File 7za.exe |
|---|
| 39 |
File CaptureClient.exe |
|---|
| 40 |
File Readme.txt |
|---|
| 41 |
File COPYING |
|---|
| 42 |
File *.exl |
|---|
| 43 |
File *.sys |
|---|
| 44 |
File *.conf |
|---|
| 45 |
File FileMonitorInstallation.inf |
|---|
| 46 |
ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 0 $INSTDIR\FileMonitorInstallation.inf" |
|---|
| 47 |
ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultInstall 0 $INSTDIR\FileMonitorInstallation.inf" |
|---|
| 48 |
|
|---|
| 49 |
SetOutPath $INSTDIR\plugins |
|---|
| 50 |
File plugins\*.dll |
|---|
| 51 |
|
|---|
| 52 |
SetOutPath $INSTDIR |
|---|
| 53 |
WriteUninstaller "uninstall.exe" |
|---|
| 54 |
|
|---|
| 55 |
; write uninstall strings |
|---|
| 56 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureClient" "DisplayName" "Capture Client (remove only)" |
|---|
| 57 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureClient" "UninstallString" '"$INSTDIR\uninstall.exe"' |
|---|
| 58 |
|
|---|
| 59 |
; reboot |
|---|
| 60 |
MessageBox MB_OK "The machine needs to reboot to complete the installation. Press OK for reboot." |
|---|
| 61 |
Reboot |
|---|
| 62 |
SectionEnd |
|---|
| 63 |
|
|---|
| 64 |
Section "Uninstall" |
|---|
| 65 |
|
|---|
| 66 |
; Uninstall file monitor; |
|---|
| 67 |
ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 0 $INSTDIR\FileMonitorInstallation.inf" |
|---|
| 68 |
|
|---|
| 69 |
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureClient" |
|---|
| 70 |
|
|---|
| 71 |
; Remove files and uninstaller |
|---|
| 72 |
Delete $INSTDIR\plugins\*.dll |
|---|
| 73 |
RMDir "$INSTDIR\plugins" |
|---|
| 74 |
Delete $INSTDIR\7za.exe |
|---|
| 75 |
Delete $INSTDIR\CaptureClient.exe |
|---|
| 76 |
Delete $INSTDIR\COPYING |
|---|
| 77 |
Delete $INSTDIR\*.exl |
|---|
| 78 |
Delete $INSTDIR\*.sys |
|---|
| 79 |
Delete $INSTDIR\Readme.txt |
|---|
| 80 |
Delete $INSTDIR\*.conf |
|---|
| 81 |
Delete $INSTDIR\FileMonitorInstallation.inf |
|---|
| 82 |
Delete $INSTDIR\uninstall.exe |
|---|
| 83 |
|
|---|
| 84 |
RMDir "$INSTDIR" |
|---|
| 85 |
SectionEnd |
|---|
| 86 |
|
|---|