--- joko/ToolBox/Windows/VpnDial-installer/vpn.nsi 2005/11/22 14:39:08 1.5 +++ joko/ToolBox/Windows/VpnDial-installer/vpn.nsi 2005/11/22 16:39:50 1.8 @@ -1,13 +1,15 @@ ; VpnDial.nsi -; $Id: vpn.nsi,v 1.5 2005/11/22 14:39:08 janosch Exp $ +; $Id: vpn.nsi,v 1.8 2005/11/22 16:39:50 joko Exp $ ; ; This script can install VpnDial, ; has uninstall support and (optionally) installs start menu shortcuts. ; !include "MUI.nsh" -!include "variables-decleration.nsi" +!include "variables-declaration.nsi" +!include "string_functions.nsi" !include "file_functions.nsi" +!include "ras_functions.nsi" ; -------------------------------- @@ -63,6 +65,7 @@ Function .onInit + System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 StrCmp $R0 0 +3 @@ -127,12 +130,16 @@ !insertmacro MUI_INSTALLOPTIONS_READ $R3 "vpndial_settings_net.ini" "Field 4" "State" !insertmacro MUI_INSTALLOPTIONS_READ $R4 "vpndial_settings_net.ini" "Field 7" "State" + StrCpy $destination_net "$R1.$R2.$R3.$R4" + ;Get Destination_mask !insertmacro MUI_INSTALLOPTIONS_READ $R5 "vpndial_settings_net.ini" "Field 12" "State" !insertmacro MUI_INSTALLOPTIONS_READ $R6 "vpndial_settings_net.ini" "Field 13" "State" !insertmacro MUI_INSTALLOPTIONS_READ $R7 "vpndial_settings_net.ini" "Field 14" "State" !insertmacro MUI_INSTALLOPTIONS_READ $R8 "vpndial_settings_net.ini" "Field 15" "State" + StrCpy $destination_mask "$R12.$R13.$R14.$R15" + ;-------------------------------------------------------------------------------------------------------------- ;Get Parameter from vpndial_settings_cert.ini @@ -184,6 +191,18 @@ SectionEnd + + + +; --------------------------------------------------------------------------- + +; pbk-Datei anpassen + +; --------------------------------------------------------------------------- + + + +; Verbindungsname Section DetailPrint "Installiere VPN-Verbindung..." Push "[##connectionname##]" #-- text to be replaced within the " " @@ -194,6 +213,7 @@ Call AdvReplaceInFile #-- Call the Function SectionEnd +; Gegenstelle Section Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " Push "PhoneNumber=$destination_host" #-- replace with anything within the " " @@ -203,6 +223,24 @@ Call AdvReplaceInFile #-- Call the Function SectionEnd + +; GUID +Section + + Call CreateRasGUID + + Pop $0 ; contains GUID + + Push "Guid=##guid##" #-- text to be replaced within the " " + Push "Guid=$0" #-- replace with anything within the " " + Push all #-- replace all occurrences + Push all #-- replace all occurrences + Push "$INSTDIR\pbk\connection.pbk" #-- file to replace in + Call AdvReplaceInFile #-- Call the Function +SectionEnd + + +; Verbindungsdatei mit globaler Datei zusammenführen Section SetShellVarContext all Push $INSTDIR\pbk\rasphone.pbk