root/capture-mod/trunk/SetupScript/CaptureBAT-Setup.nsi

Revision 823, 2.0 kB (checked in by xkovah, 1 year ago)

adding the files finally

Line 
1 ; CaptureBAT-Setup.nsi
2
3 ;--------------------------------
4
5 ; The name of the installer
6 Name "Capture BAT"
7
8 ; The file to write
9 OutFile "CaptureBAT-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 CaptureBAT.exe
40   File Readme.txt
41   File COPYING
42   File *.exl
43   File *.sys
44   File FileMonitorInstallation.inf
45   ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 0 $INSTDIR\FileMonitorInstallation.inf"
46   ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultInstall 0 $INSTDIR\FileMonitorInstallation.inf"
47
48   SetOutPath $INSTDIR
49   WriteUninstaller "uninstall.exe"
50
51     ; write uninstall strings
52   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureBAT" "DisplayName" "Capture BAT (remove only)"
53   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureBAT" "UninstallString" '"$INSTDIR\uninstall.exe"'
54
55    ; reboot
56   MessageBox MB_OK "The machine needs to reboot to complete the installation. Press OK for reboot." 
57   Reboot 
58 SectionEnd
59
60 Section "Uninstall"
61  
62   ; Uninstall file monitor;
63   ExecWait "rundll32 setupapi.dll,InstallHinfSection DefaultUninstall 0 $INSTDIR\FileMonitorInstallation.inf"
64
65   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CaptureBAT"
66
67   ; Remove files and uninstaller
68   Delete $INSTDIR\7za.exe
69   Delete $INSTDIR\CaptureBAT.exe
70   Delete $INSTDIR\COPYING
71   Delete $INSTDIR\*.exl
72   Delete $INSTDIR\*.sys
73   Delete $INSTDIR\Readme.txt
74   Delete $INSTDIR\FileMonitorInstallation.inf
75   Delete $INSTDIR\uninstall.exe
76  
77   RMDir "$INSTDIR"
78 SectionEnd
79
Note: See TracBrowser for help on using the browser.