/[cvs]/joko/ToolBox/Windows/VpnDial-installer/vpn.nsi
ViewVC logotype

Diff of /joko/ToolBox/Windows/VpnDial-installer/vpn.nsi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed