1 |
; VpnDial.nsi |
; VpnDial.nsi |
2 |
; $Id$ |
; $Id$ |
3 |
; |
; |
4 |
; This script can install VpnDial, |
; This script can install VpnDial, |
5 |
; has uninstall support and (optionally) installs start menu shortcuts. |
; has uninstall support and (optionally) installs start menu shortcuts. |
6 |
; |
; |
7 |
|
|
8 |
!include "MUI.nsh" |
!include "MUI.nsh" |
9 |
!include "variables-decleration.nsi" |
!include "variables-declaration.nsi" |
10 |
!include "file_functions.nsi" |
!include "string_functions.nsi" |
11 |
|
!include "file_functions.nsi" |
12 |
|
!include "ras_functions.nsi" |
13 |
; -------------------------------- |
|
14 |
; The name of the installer |
|
15 |
; -------------------------------- |
; -------------------------------- |
16 |
Name "VpnDial" |
; The name of the installer |
17 |
|
; -------------------------------- |
18 |
; The file to write |
Name "VpnDial" |
19 |
OutFile "VpnDial-Setup.exe" |
|
20 |
|
; The file to write |
21 |
; The default installation directory |
OutFile "VpnDial-Setup.exe" |
22 |
InstallDir $PROGRAMFILES\NetFragOrg\VpnDial |
|
23 |
|
; The default installation directory |
24 |
; Registry key to check for directory (so if you install again, it will |
InstallDir $PROGRAMFILES\NetFragOrg\VpnDial |
25 |
; overwrite the old one automatically) |
|
26 |
InstallDirRegKey HKLM "Software\NSIS_VpnDial" "Install_Dir" |
; Registry key to check for directory (so if you install again, it will |
27 |
|
; overwrite the old one automatically) |
28 |
SetOverwrite on |
InstallDirRegKey HKLM "Software\NSIS_VpnDial" "Install_Dir" |
29 |
|
|
30 |
|
SetOverwrite on |
31 |
; -------------------------------- |
|
32 |
; (MUI) Interface Settings |
|
33 |
; -------------------------------- |
; -------------------------------- |
34 |
!define MUI_ABORTWARNING |
; (MUI) Interface Settings |
35 |
!define MUI_COMPONENTSPAGE_NODESC |
; -------------------------------- |
36 |
!define MUI_ICON "key.ico" |
!define MUI_ABORTWARNING |
37 |
!define MUI_UNICON "key.ico" |
!define MUI_COMPONENTSPAGE_NODESC |
38 |
|
!define MUI_ICON "key.ico" |
39 |
|
!define MUI_UNICON "key.ico" |
40 |
; -------------------------------- |
|
41 |
; Pages |
|
42 |
; -------------------------------- |
; -------------------------------- |
43 |
|
; Pages |
44 |
UninstPage uninstConfirm |
; -------------------------------- |
45 |
UninstPage instfiles |
|
46 |
|
UninstPage uninstConfirm |
47 |
!insertmacro MUI_PAGE_WELCOME |
UninstPage instfiles |
48 |
Page custom SetupPage1 |
|
49 |
Page custom SetupPage2 |
!insertmacro MUI_PAGE_WELCOME |
50 |
Page custom SetupPage3 |
Page custom SetupPage1 |
51 |
!insertmacro MUI_PAGE_COMPONENTS |
Page custom SetupPage2 |
52 |
!insertmacro MUI_PAGE_DIRECTORY |
Page custom SetupPage3 |
53 |
!insertmacro MUI_PAGE_INSTFILES |
!insertmacro MUI_PAGE_COMPONENTS |
54 |
|
!insertmacro MUI_PAGE_DIRECTORY |
55 |
!insertmacro MUI_UNPAGE_CONFIRM |
!insertmacro MUI_PAGE_INSTFILES |
56 |
!insertmacro MUI_UNPAGE_INSTFILES |
|
57 |
!insertmacro MUI_LANGUAGE "German" |
!insertmacro MUI_UNPAGE_CONFIRM |
58 |
|
!insertmacro MUI_UNPAGE_INSTFILES |
59 |
|
!insertmacro MUI_LANGUAGE "German" |
60 |
; -------------------------------- |
|
61 |
; .onInit |
|
62 |
; -------------------------------- |
; -------------------------------- |
63 |
|
; .onInit |
64 |
Function .onInit |
; -------------------------------- |
65 |
|
|
66 |
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' |
Function .onInit |
67 |
Pop $R0 |
|
68 |
StrCmp $R0 0 +3 |
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' |
69 |
MessageBox MB_OK|MB_ICONEXCLAMATION "Die Installation läuft bereits." |
Pop $R0 |
70 |
Abort |
StrCmp $R0 0 +3 |
71 |
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Die Installation läuft bereits." |
72 |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings.ini" |
Abort |
73 |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_net.ini" |
|
74 |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_cert.ini" |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings.ini" |
75 |
FunctionEnd |
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_net.ini" |
76 |
|
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_cert.ini" |
77 |
Function SetupPage1 |
FunctionEnd |
78 |
; custom page |
|
79 |
; see: http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html#customPages |
Function SetupPage1 |
80 |
; and: http://nsis.sourceforge.net/Docs/InstallOptions/Readme.html |
; custom page |
81 |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
; see: http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html#customPages |
82 |
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings.ini" |
; and: http://nsis.sourceforge.net/Docs/InstallOptions/Readme.html |
83 |
FunctionEnd |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
84 |
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings.ini" |
85 |
Function SetupPage2 |
FunctionEnd |
86 |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
|
87 |
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_net.ini" |
Function SetupPage2 |
88 |
FunctionEnd |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
89 |
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_net.ini" |
90 |
Function SetupPage3 |
FunctionEnd |
91 |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
|
92 |
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_cert.ini" |
Function SetupPage3 |
93 |
FunctionEnd |
!insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" |
94 |
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_cert.ini" |
95 |
|
FunctionEnd |
96 |
; -------------------------------- |
|
97 |
; The stuff to install |
|
98 |
; -------------------------------- |
; -------------------------------- |
99 |
|
; The stuff to install |
100 |
Section |
; -------------------------------- |
101 |
|
|
102 |
;Get Parameter from vpndial_settings.ini |
Section |
103 |
|
|
104 |
;Get Connectionname |
;Get Parameter from vpndial_settings.ini |
105 |
!insertmacro MUI_INSTALLOPTIONS_READ $connectionname "vpndial_settings.ini" "Field 2" "State" |
|
106 |
;MessageBox MB_OK $R1 |
;Get Connectionname |
107 |
;StrCpy $connectionname $R1 |
!insertmacro MUI_INSTALLOPTIONS_READ $connectionname "vpndial_settings.ini" "Field 2" "State" |
108 |
|
;MessageBox MB_OK $R1 |
109 |
;Get Destination_host |
;StrCpy $connectionname $R1 |
110 |
!insertmacro MUI_INSTALLOPTIONS_READ $destination_host "vpndial_settings.ini" "Field 3" "State" |
|
111 |
;MessageBox MB_OK $R2 |
;Get Destination_host |
112 |
;StrCpy $destination_host $R2 |
!insertmacro MUI_INSTALLOPTIONS_READ $destination_host "vpndial_settings.ini" "Field 3" "State" |
113 |
|
;MessageBox MB_OK $R2 |
114 |
;Get Username |
;StrCpy $destination_host $R2 |
115 |
!insertmacro MUI_INSTALLOPTIONS_READ $username "vpndial_settings.ini" "Field 4" "State" |
|
116 |
|
;Get Username |
117 |
;Get Password |
!insertmacro MUI_INSTALLOPTIONS_READ $username "vpndial_settings.ini" "Field 4" "State" |
118 |
!insertmacro MUI_INSTALLOPTIONS_READ $userpass "vpndial_settings.ini" "Field 8" "State" |
|
119 |
|
;Get Password |
120 |
;------------------------------------------------------------------------------------------------------------- |
!insertmacro MUI_INSTALLOPTIONS_READ $userpass "vpndial_settings.ini" "Field 8" "State" |
121 |
|
|
122 |
;Get Parameter from vpndial_settings_net.ini |
;------------------------------------------------------------------------------------------------------------- |
123 |
|
|
124 |
;Get Destination_net |
;Get Parameter from vpndial_settings_net.ini |
125 |
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "vpndial_settings_net.ini" "Field 2" "State" |
|
126 |
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "vpndial_settings_net.ini" "Field 3" "State" |
;Get Destination_net |
127 |
!insertmacro MUI_INSTALLOPTIONS_READ $R3 "vpndial_settings_net.ini" "Field 4" "State" |
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "vpndial_settings_net.ini" "Field 2" "State" |
128 |
!insertmacro MUI_INSTALLOPTIONS_READ $R4 "vpndial_settings_net.ini" "Field 7" "State" |
!insertmacro MUI_INSTALLOPTIONS_READ $R2 "vpndial_settings_net.ini" "Field 3" "State" |
129 |
|
!insertmacro MUI_INSTALLOPTIONS_READ $R3 "vpndial_settings_net.ini" "Field 4" "State" |
130 |
;Get Destination_mask |
!insertmacro MUI_INSTALLOPTIONS_READ $R4 "vpndial_settings_net.ini" "Field 7" "State" |
131 |
!insertmacro MUI_INSTALLOPTIONS_READ $R5 "vpndial_settings_net.ini" "Field 12" "State" |
|
132 |
!insertmacro MUI_INSTALLOPTIONS_READ $R6 "vpndial_settings_net.ini" "Field 13" "State" |
StrCpy $destination_net "$R1.$R2.$R3.$R4" |
133 |
!insertmacro MUI_INSTALLOPTIONS_READ $R7 "vpndial_settings_net.ini" "Field 14" "State" |
|
134 |
!insertmacro MUI_INSTALLOPTIONS_READ $R8 "vpndial_settings_net.ini" "Field 15" "State" |
;Get Destination_mask |
135 |
|
!insertmacro MUI_INSTALLOPTIONS_READ $R5 "vpndial_settings_net.ini" "Field 12" "State" |
136 |
;-------------------------------------------------------------------------------------------------------------- |
!insertmacro MUI_INSTALLOPTIONS_READ $R6 "vpndial_settings_net.ini" "Field 13" "State" |
137 |
|
!insertmacro MUI_INSTALLOPTIONS_READ $R7 "vpndial_settings_net.ini" "Field 14" "State" |
138 |
;Get Parameter from vpndial_settings_cert.ini |
!insertmacro MUI_INSTALLOPTIONS_READ $R8 "vpndial_settings_net.ini" "Field 15" "State" |
139 |
|
|
140 |
!insertmacro MUI_INSTALLOPTIONS_READ $cacert "vpndial_settings_cert.ini" "Field 2" "State" |
StrCpy $destination_mask "$R12.$R13.$R14.$R15" |
141 |
!insertmacro MUI_INSTALLOPTIONS_READ $usercert "vpndial_settings_cert.ini" "Field 3" "State" |
|
142 |
|
;-------------------------------------------------------------------------------------------------------------- |
143 |
SectionEnd |
|
144 |
|
;Get Parameter from vpndial_settings_cert.ini |
145 |
Section |
|
146 |
SetShellVarContext all |
!insertmacro MUI_INSTALLOPTIONS_READ $cacert "vpndial_settings_cert.ini" "Field 2" "State" |
147 |
Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
!insertmacro MUI_INSTALLOPTIONS_READ $usercert "vpndial_settings_cert.ini" "Field 3" "State" |
148 |
Push "[$connectionname]" |
|
149 |
Call FileSearch |
SectionEnd |
150 |
Pop $0 #Number of times found throughout |
|
151 |
Pop $1 #Found at all? yes/no |
Section |
152 |
Pop $2 #Number of lines found in |
SetShellVarContext all |
153 |
StrCmp $1 yes 0 +3 |
Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
154 |
MessageBox MB_OK "Die Verbindung $\"$connectionname$\" existiert bereits. Der Eintrag kann leider nicht doppelt angelegt werden." |
Push "[$connectionname]" |
155 |
Abort |
Call FileSearch |
156 |
SectionEnd |
Pop $0 #Number of times found throughout |
157 |
|
Pop $1 #Found at all? yes/no |
158 |
Section "VpnDial" IDX_VpnDial |
Pop $2 #Number of lines found in |
159 |
|
StrCmp $1 yes 0 +3 |
160 |
SetOverwrite on |
MessageBox MB_OK "Die Verbindung $\"$connectionname$\" existiert bereits. Der Eintrag kann leider nicht doppelt angelegt werden." |
161 |
|
Abort |
162 |
SetDetailsPrint both |
SectionEnd |
163 |
DetailPrint "Installiere VpnDial..." |
|
164 |
|
Section "VpnDial" IDX_VpnDial |
165 |
;SectionIn RO |
|
166 |
|
SetOverwrite on |
167 |
; Set output path to the installation directory. |
|
168 |
SetOutPath $INSTDIR |
SetDetailsPrint both |
169 |
|
DetailPrint "Installiere VpnDial..." |
170 |
;CreateDirectory $INSTDIR\certs\ |
|
171 |
|
;SectionIn RO |
172 |
; Put file there |
|
173 |
File /r "vpndial\*.*" |
; Set output path to the installation directory. |
174 |
|
SetOutPath $INSTDIR |
175 |
; Write the installation path into the registry |
|
176 |
WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" |
;CreateDirectory $INSTDIR\certs\ |
177 |
|
|
178 |
; Write the uninstall keys for Windows |
; Put file there |
179 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "DisplayName" "VpnDial" |
File /r "vpndial\*.*" |
180 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "UninstallString" '"$INSTDIR\uninstall.exe"' |
|
181 |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoModify" 1 |
; Write the installation path into the registry |
182 |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoRepair" 1 |
WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" |
183 |
WriteUninstaller "uninstall.exe" |
|
184 |
|
; Write the uninstall keys for Windows |
185 |
SectionEnd |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "DisplayName" "VpnDial" |
186 |
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "UninstallString" '"$INSTDIR\uninstall.exe"' |
187 |
Section |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoModify" 1 |
188 |
DetailPrint "Installiere VPN-Verbindung..." |
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoRepair" 1 |
189 |
Push "[##connectionname##]" #-- text to be replaced within the " " |
WriteUninstaller "uninstall.exe" |
190 |
Push "[$connectionname]" #-- replace with anything within the " " |
|
191 |
Push all #-- replace all occurrences |
SectionEnd |
192 |
Push all #-- replace all occurrences |
|
193 |
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
|
194 |
Call AdvReplaceInFile #-- Call the Function |
; --------------------------------------------------------------------------- |
195 |
SectionEnd |
; pbk-Datei anpassen |
196 |
|
; --------------------------------------------------------------------------- |
197 |
Section |
|
198 |
Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " |
; Verbindungsname |
199 |
Push "PhoneNumber=$destination_host" #-- replace with anything within the " " |
Section |
200 |
Push all #-- replace all occurrences |
DetailPrint "Installiere VPN-Verbindung..." |
201 |
Push all #-- replace all occurrences |
Push "[##connectionname##]" #-- text to be replaced within the " " |
202 |
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
Push "[$connectionname]" #-- replace with anything within the " " |
203 |
Call AdvReplaceInFile #-- Call the Function |
Push all #-- replace all occurrences |
204 |
SectionEnd |
Push all #-- replace all occurrences |
205 |
|
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
206 |
Section |
Call AdvReplaceInFile #-- Call the Function |
207 |
SetShellVarContext all |
SectionEnd |
208 |
Push $INSTDIR\pbk\rasphone.pbk |
|
209 |
Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
; Gegenstelle |
210 |
Push $INSTDIR\pbk\connection.pbk |
Section |
211 |
Call JoinFiles |
Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " |
212 |
CopyFiles $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk $INSTDIR\pbk\rasphone_orig.pbk |
Push "PhoneNumber=$destination_host" #-- replace with anything within the " " |
213 |
CopyFiles $INSTDIR\pbk\rasphone.pbk $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
Push all #-- replace all occurrences |
214 |
SetShellVarContext current |
Push all #-- replace all occurrences |
215 |
SectionEnd |
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
216 |
|
Call AdvReplaceInFile #-- Call the Function |
217 |
Section |
SectionEnd |
218 |
nsExec::Exec "$INSTDIR\bin\VpnDial.exe --setup $connectionname --user $username --pass $userpass" |
|
219 |
SectionEnd |
; GUID |
220 |
|
Section |
221 |
Section |
Call CreateRasGUID |
222 |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" |
Pop $0 ; contains GUID |
223 |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" |
Push "Guid=##guid##" #-- text to be replaced within the " " |
224 |
SectionEnd |
Push "Guid=$0" #-- replace with anything within the " " |
225 |
|
Push all #-- replace all occurrences |
226 |
Section |
Push all #-- replace all occurrences |
227 |
;nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $INSTDIR\certs\$usercert -c LOCAL_MACHINE\My -a $currentuser" |
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
228 |
nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $usercert -c LOCAL_MACHINE\My -a $currentuser" |
Call AdvReplaceInFile #-- Call the Function |
229 |
SectionEnd |
SectionEnd |
230 |
|
|
231 |
; Optional section (can be disabled by the user) |
; Verbindungsdatei mit globaler Datei zusammenführen |
232 |
Section "Startmenü-Einträge" IDX_STARTMENU |
Section |
233 |
|
SetShellVarContext all |
234 |
SetDetailsPrint both |
Push $INSTDIR\pbk\rasphone.pbk |
235 |
DetailPrint "Installiere Startmenü-Einträge und Desktop-Verknüpfungen..." |
Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
236 |
|
Push $INSTDIR\pbk\connection.pbk |
237 |
CreateDirectory "$SMPROGRAMS\VpnDial" |
Call JoinFiles |
238 |
CreateShortCut "$SMPROGRAMS\VpnDial\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
CopyFiles $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk $INSTDIR\pbk\rasphone_orig.pbk |
239 |
CreateShortCut "$SMPROGRAMS\VpnDial\VpnMonitor.lnk" "$INSTDIR\bin\VpnDial.exe" "--gui --up --monitor $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 |
CopyFiles $INSTDIR\pbk\rasphone.pbk $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk |
240 |
CreateShortCut "$SMPROGRAMS\VpnDial\VpnDial.lnk" "$INSTDIR\bin\VpnDial.exe" "--dial $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 |
SetShellVarContext current |
241 |
;CreateShortCut "$SMPROGRAMS\VpnDial\VpnSetup.lnk" "$INSTDIR\bin\VpnDial.exe" "--setup $connectionname --user $username --pass $userpass" "$INSTDIR\bin\VpnDial.exe" 0 |
SectionEnd |
242 |
CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 |
|
243 |
CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 |
Section |
244 |
;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 |
nsExec::Exec "$INSTDIR\bin\VpnDial.exe --setup $connectionname --user $username --pass $userpass" |
245 |
;CreateShortCut "$SMPROGRAMS\VpnDial\README-HTML.lnk" "$INSTDIR\doc\README.htm" "" "$INSTDIR\doc\README.htm" 0 |
SectionEnd |
246 |
|
|
247 |
CopyFiles "$INSTDIR\links\Netzwerkverbindung*" "$SMPROGRAMS\VpnDial\" |
Section |
248 |
|
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" |
249 |
SectionEnd |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" |
250 |
|
SectionEnd |
251 |
|
|
252 |
; -------------------------------- |
Section |
253 |
; Uninstaller |
;nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $INSTDIR\certs\$usercert -c LOCAL_MACHINE\My -a $currentuser" |
254 |
; -------------------------------- |
nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $usercert -c LOCAL_MACHINE\My -a $currentuser" |
255 |
|
SectionEnd |
256 |
Section "Uninstall" IDX_UNINSTALL |
|
257 |
|
; Optional section (can be disabled by the user) |
258 |
; ------------------ |
Section "Startmenü-Einträge" IDX_STARTMENU |
259 |
; uninstall VpnDial |
|
260 |
; ------------------ |
SetDetailsPrint both |
261 |
|
DetailPrint "Installiere Startmenü-Einträge und Desktop-Verknüpfungen..." |
262 |
; Remove registry keys |
|
263 |
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" |
CreateDirectory "$SMPROGRAMS\VpnDial" |
264 |
DeleteRegKey HKLM SOFTWARE\NSIS_VpnDial |
CreateShortCut "$SMPROGRAMS\VpnDial\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
265 |
|
CreateShortCut "$SMPROGRAMS\VpnDial\VpnMonitor.lnk" "$INSTDIR\bin\VpnDial.exe" "--gui --up --monitor $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 |
266 |
;Remove files and uninstaller |
CreateShortCut "$SMPROGRAMS\VpnDial\VpnDial.lnk" "$INSTDIR\bin\VpnDial.exe" "--dial $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 |
267 |
;Delete $INSTDIR\makensisw.exe |
;CreateShortCut "$SMPROGRAMS\VpnDial\VpnSetup.lnk" "$INSTDIR\bin\VpnDial.exe" "--setup $connectionname --user $username --pass $userpass" "$INSTDIR\bin\VpnDial.exe" 0 |
268 |
;Delete $INSTDIR\uninstall.exe |
CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 |
269 |
;Delete "$INSTDIR\*.*" |
CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 |
270 |
|
;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 |
271 |
; Remove shortcuts, if any |
;CreateShortCut "$SMPROGRAMS\VpnDial\README-HTML.lnk" "$INSTDIR\doc\README.htm" "" "$INSTDIR\doc\README.htm" 0 |
272 |
Delete "$SMPROGRAMS\VpnDial\*.*" |
|
273 |
|
CopyFiles "$INSTDIR\links\Netzwerkverbindung*" "$SMPROGRAMS\VpnDial\" |
274 |
; Remove directories used |
|
275 |
RMDir /r "$SMPROGRAMS\VpnDial" |
SectionEnd |
276 |
RMDir /r "$INSTDIR" |
|
277 |
|
|
278 |
SectionEnd |
; -------------------------------- |
279 |
|
; Uninstaller |
280 |
|
; -------------------------------- |
281 |
|
|
282 |
|
Section "Uninstall" IDX_UNINSTALL |
283 |
|
|
284 |
|
; ------------------ |
285 |
|
; uninstall VpnDial |
286 |
|
; ------------------ |
287 |
|
|
288 |
|
; Remove registry keys |
289 |
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" |
290 |
|
DeleteRegKey HKLM SOFTWARE\NSIS_VpnDial |
291 |
|
|
292 |
|
;Remove files and uninstaller |
293 |
|
;Delete $INSTDIR\makensisw.exe |
294 |
|
;Delete $INSTDIR\uninstall.exe |
295 |
|
;Delete "$INSTDIR\*.*" |
296 |
|
|
297 |
|
; Remove shortcuts, if any |
298 |
|
Delete "$SMPROGRAMS\VpnDial\*.*" |
299 |
|
|
300 |
|
; Remove directories used |
301 |
|
RMDir /r "$SMPROGRAMS\VpnDial" |
302 |
|
RMDir /r "$INSTDIR" |
303 |
|
|
304 |
|
SectionEnd |