| 6 |
; |
; |
| 7 |
|
|
| 8 |
!include "MUI.nsh" |
!include "MUI.nsh" |
| 9 |
!include "variables-decleration.nsi" |
!include "variables-declaration.nsi" |
| 10 |
|
!include "string_functions.nsi" |
| 11 |
!include "file_functions.nsi" |
!include "file_functions.nsi" |
| 12 |
|
!include "ras_functions.nsi" |
| 13 |
|
|
| 14 |
|
|
| 15 |
; -------------------------------- |
; -------------------------------- |
| 65 |
|
|
| 66 |
Function .onInit |
Function .onInit |
| 67 |
|
|
| 68 |
|
|
| 69 |
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' |
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' |
| 70 |
Pop $R0 |
Pop $R0 |
| 71 |
StrCmp $R0 0 +3 |
StrCmp $R0 0 +3 |
| 177 |
;CreateDirectory $INSTDIR\certs\ |
;CreateDirectory $INSTDIR\certs\ |
| 178 |
|
|
| 179 |
; Put file there |
; Put file there |
| 180 |
File /r "vpndial\*.*" |
File /r /x CVS "vpndial\*.*" |
| 181 |
|
|
| 182 |
; Write the installation path into the registry |
; Write the installation path into the registry |
| 183 |
WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" |
WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" |
| 191 |
|
|
| 192 |
SectionEnd |
SectionEnd |
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
; --------------------------------------------------------------------------- |
| 198 |
|
|
| 199 |
|
; pbk-Datei anpassen |
| 200 |
|
|
| 201 |
|
; --------------------------------------------------------------------------- |
| 202 |
|
|
| 203 |
|
|
| 204 |
|
|
| 205 |
|
; Verbindungsname |
| 206 |
Section |
Section |
| 207 |
DetailPrint "Installiere VPN-Verbindung..." |
DetailPrint "Installiere VPN-Verbindung..." |
| 208 |
Push "[##connectionname##]" #-- text to be replaced within the " " |
Push "[##connectionname##]" #-- text to be replaced within the " " |
| 213 |
Call AdvReplaceInFile #-- Call the Function |
Call AdvReplaceInFile #-- Call the Function |
| 214 |
SectionEnd |
SectionEnd |
| 215 |
|
|
| 216 |
|
; Gegenstelle |
| 217 |
Section |
Section |
| 218 |
Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " |
Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " |
| 219 |
Push "PhoneNumber=$destination_host" #-- replace with anything within the " " |
Push "PhoneNumber=$destination_host" #-- replace with anything within the " " |
| 223 |
Call AdvReplaceInFile #-- Call the Function |
Call AdvReplaceInFile #-- Call the Function |
| 224 |
SectionEnd |
SectionEnd |
| 225 |
|
|
| 226 |
|
|
| 227 |
|
; GUID |
| 228 |
|
Section |
| 229 |
|
|
| 230 |
|
Call CreateRasGUID |
| 231 |
|
|
| 232 |
|
Pop $0 ; contains GUID |
| 233 |
|
|
| 234 |
|
Push "Guid=##guid##" #-- text to be replaced within the " " |
| 235 |
|
Push "Guid=$0" #-- replace with anything within the " " |
| 236 |
|
Push all #-- replace all occurrences |
| 237 |
|
Push all #-- replace all occurrences |
| 238 |
|
Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in |
| 239 |
|
Call AdvReplaceInFile #-- Call the Function |
| 240 |
|
SectionEnd |
| 241 |
|
|
| 242 |
|
|
| 243 |
|
; Verbindungsdatei mit globaler Datei zusammenführen |
| 244 |
Section |
Section |
| 245 |
SetShellVarContext all |
SetShellVarContext all |
| 246 |
Push $INSTDIR\pbk\rasphone.pbk |
Push $INSTDIR\pbk\rasphone.pbk |
| 258 |
|
|
| 259 |
Section |
Section |
| 260 |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" |
| 261 |
;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" |
nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" |
| 262 |
SectionEnd |
SectionEnd |
| 263 |
|
|
| 264 |
Section |
Section |
| 274 |
|
|
| 275 |
CreateDirectory "$SMPROGRAMS\VpnDial" |
CreateDirectory "$SMPROGRAMS\VpnDial" |
| 276 |
CreateShortCut "$SMPROGRAMS\VpnDial\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 |
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 |
CreateShortCut "$SMPROGRAMS\VpnDial\VpnMonitor.lnk" "$INSTDIR\bin\VpnDial.exe" "--gui --up --monitor $connectionname --net $destination_net --mask $destination_mask" "$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 |
CreateShortCut "$SMPROGRAMS\VpnDial\VpnDial.lnk" "$INSTDIR\bin\VpnDial.exe" "--dial $connectionname" "$INSTDIR\bin\VpnDial.exe" 0 |
|
;CreateShortCut "$SMPROGRAMS\VpnDial\VpnSetup.lnk" "$INSTDIR\bin\VpnDial.exe" "--setup $connectionname --user $username --pass $userpass" "$INSTDIR\bin\VpnDial.exe" 0 |
|
| 279 |
CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 |
CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 |
| 280 |
CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 |
CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 |
| 281 |
;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 |
;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 |