--- joko/ToolBox/Windows/VpnDial-installer/vpn.nsi 2005/11/22 15:50:55 1.6 +++ joko/ToolBox/Windows/VpnDial-installer/vpn.nsi 2005/11/22 16:26:59 1.7 @@ -1,282 +1,304 @@ -; VpnDial.nsi -; $Id: vpn.nsi,v 1.6 2005/11/22 15:50:55 janosch Exp $ -; -; This script can install VpnDial, -; has uninstall support and (optionally) installs start menu shortcuts. -; - -!include "MUI.nsh" -!include "variables-decleration.nsi" -!include "file_functions.nsi" - - -; -------------------------------- -; The name of the installer -; -------------------------------- -Name "VpnDial" - -; The file to write -OutFile "VpnDial-Setup.exe" - -; The default installation directory -InstallDir $PROGRAMFILES\NetFragOrg\VpnDial - -; Registry key to check for directory (so if you install again, it will -; overwrite the old one automatically) -InstallDirRegKey HKLM "Software\NSIS_VpnDial" "Install_Dir" - -SetOverwrite on - - -; -------------------------------- -; (MUI) Interface Settings -; -------------------------------- -!define MUI_ABORTWARNING -!define MUI_COMPONENTSPAGE_NODESC -!define MUI_ICON "key.ico" -!define MUI_UNICON "key.ico" - - -; -------------------------------- -; Pages -; -------------------------------- - -UninstPage uninstConfirm -UninstPage instfiles - -!insertmacro MUI_PAGE_WELCOME -Page custom SetupPage1 -Page custom SetupPage2 -Page custom SetupPage3 -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES - -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -!insertmacro MUI_LANGUAGE "German" - - -; -------------------------------- -; .onInit -; -------------------------------- - -Function .onInit - - System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' - Pop $R0 - StrCmp $R0 0 +3 - MessageBox MB_OK|MB_ICONEXCLAMATION "Die Installation läuft bereits." - Abort - - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings.ini" - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_net.ini" - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_cert.ini" -FunctionEnd - -Function SetupPage1 - ; custom page - ; see: http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html#customPages - ; and: http://nsis.sourceforge.net/Docs/InstallOptions/Readme.html - !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings.ini" -FunctionEnd - -Function SetupPage2 - !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_net.ini" -FunctionEnd - -Function SetupPage3 - !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_cert.ini" -FunctionEnd - - -; -------------------------------- -; The stuff to install -; -------------------------------- - -Section - - ;Get Parameter from vpndial_settings.ini - - ;Get Connectionname - !insertmacro MUI_INSTALLOPTIONS_READ $connectionname "vpndial_settings.ini" "Field 2" "State" - ;MessageBox MB_OK $R1 - ;StrCpy $connectionname $R1 - - ;Get Destination_host - !insertmacro MUI_INSTALLOPTIONS_READ $destination_host "vpndial_settings.ini" "Field 3" "State" - ;MessageBox MB_OK $R2 - ;StrCpy $destination_host $R2 - - ;Get Username - !insertmacro MUI_INSTALLOPTIONS_READ $username "vpndial_settings.ini" "Field 4" "State" - - ;Get Password - !insertmacro MUI_INSTALLOPTIONS_READ $userpass "vpndial_settings.ini" "Field 8" "State" - - ;------------------------------------------------------------------------------------------------------------- - - ;Get Parameter from vpndial_settings_net.ini - - ;Get Destination_net - !insertmacro MUI_INSTALLOPTIONS_READ $R1 "vpndial_settings_net.ini" "Field 2" "State" - !insertmacro MUI_INSTALLOPTIONS_READ $R2 "vpndial_settings_net.ini" "Field 3" "State" - !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 - - !insertmacro MUI_INSTALLOPTIONS_READ $cacert "vpndial_settings_cert.ini" "Field 2" "State" - !insertmacro MUI_INSTALLOPTIONS_READ $usercert "vpndial_settings_cert.ini" "Field 3" "State" - -SectionEnd - -Section - SetShellVarContext all - Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk - Push "[$connectionname]" - Call FileSearch - Pop $0 #Number of times found throughout - Pop $1 #Found at all? yes/no - Pop $2 #Number of lines found in - StrCmp $1 yes 0 +3 - MessageBox MB_OK "Die Verbindung $\"$connectionname$\" existiert bereits. Der Eintrag kann leider nicht doppelt angelegt werden." - Abort -SectionEnd - -Section "VpnDial" IDX_VpnDial - - SetOverwrite on - - SetDetailsPrint both - DetailPrint "Installiere VpnDial..." - - ;SectionIn RO - - ; Set output path to the installation directory. - SetOutPath $INSTDIR - - ;CreateDirectory $INSTDIR\certs\ - - ; Put file there - File /r "vpndial\*.*" - - ; Write the installation path into the registry - WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "DisplayName" "VpnDial" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoRepair" 1 - WriteUninstaller "uninstall.exe" - -SectionEnd - -Section - DetailPrint "Installiere VPN-Verbindung..." - Push "[##connectionname##]" #-- text to be replaced within the " " - Push "[$connectionname]" #-- 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 - -Section - Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " - Push "PhoneNumber=$destination_host" #-- 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 - -Section - SetShellVarContext all - Push $INSTDIR\pbk\rasphone.pbk - Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk - Push $INSTDIR\pbk\connection.pbk - Call JoinFiles - CopyFiles $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk $INSTDIR\pbk\rasphone_orig.pbk - CopyFiles $INSTDIR\pbk\rasphone.pbk $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk - SetShellVarContext current -SectionEnd - -Section -nsExec::Exec "$INSTDIR\bin\VpnDial.exe --setup $connectionname --user $username --pass $userpass" -SectionEnd - -Section -;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" -;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" -SectionEnd - -Section -;nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $INSTDIR\certs\$usercert -c LOCAL_MACHINE\My -a $currentuser" -nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $usercert -c LOCAL_MACHINE\My -a $currentuser" -SectionEnd - -; Optional section (can be disabled by the user) -Section "Startmenü-Einträge" IDX_STARTMENU - - SetDetailsPrint both - DetailPrint "Installiere Startmenü-Einträge und Desktop-Verknüpfungen..." - - CreateDirectory "$SMPROGRAMS\VpnDial" - CreateShortCut "$SMPROGRAMS\VpnDial\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\VpnDial\VpnMonitor.lnk" "$INSTDIR\bin\VpnDial.exe" "--gui --up --monitor $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 - CreateShortCut "$SMPROGRAMS\VpnDial\VpnDial.lnk" "$INSTDIR\bin\VpnDial.exe" "--dial $connectionname --net $destination_net" "$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 - CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 - CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 - ;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 - ;CreateShortCut "$SMPROGRAMS\VpnDial\README-HTML.lnk" "$INSTDIR\doc\README.htm" "" "$INSTDIR\doc\README.htm" 0 - - CopyFiles "$INSTDIR\links\Netzwerkverbindung*" "$SMPROGRAMS\VpnDial\" - -SectionEnd - - -; -------------------------------- -; Uninstaller -; -------------------------------- - -Section "Uninstall" IDX_UNINSTALL - - ; ------------------ - ; uninstall VpnDial - ; ------------------ - - ; Remove registry keys - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" - DeleteRegKey HKLM SOFTWARE\NSIS_VpnDial - - ;Remove files and uninstaller - ;Delete $INSTDIR\makensisw.exe - ;Delete $INSTDIR\uninstall.exe - ;Delete "$INSTDIR\*.*" - - ; Remove shortcuts, if any - Delete "$SMPROGRAMS\VpnDial\*.*" - - ; Remove directories used - RMDir /r "$SMPROGRAMS\VpnDial" - RMDir /r "$INSTDIR" - -SectionEnd +; VpnDial.nsi +; $Id: vpn.nsi,v 1.7 2005/11/22 16:26:59 joko Exp $ +; +; This script can install VpnDial, +; has uninstall support and (optionally) installs start menu shortcuts. +; + +!include "MUI.nsh" +!include "variables-declaration.nsi" +!include "string_functions.nsi" +!include "file_functions.nsi" +!include "ras_functions.nsi" + + +; -------------------------------- +; The name of the installer +; -------------------------------- +Name "VpnDial" + +; The file to write +OutFile "VpnDial-Setup.exe" + +; The default installation directory +InstallDir $PROGRAMFILES\NetFragOrg\VpnDial + +; Registry key to check for directory (so if you install again, it will +; overwrite the old one automatically) +InstallDirRegKey HKLM "Software\NSIS_VpnDial" "Install_Dir" + +SetOverwrite on + + +; -------------------------------- +; (MUI) Interface Settings +; -------------------------------- +!define MUI_ABORTWARNING +!define MUI_COMPONENTSPAGE_NODESC +!define MUI_ICON "key.ico" +!define MUI_UNICON "key.ico" + + +; -------------------------------- +; Pages +; -------------------------------- + +UninstPage uninstConfirm +UninstPage instfiles + +!insertmacro MUI_PAGE_WELCOME +Page custom SetupPage1 +Page custom SetupPage2 +Page custom SetupPage3 +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_LANGUAGE "German" + + +; -------------------------------- +; .onInit +; -------------------------------- + +Function .onInit + + System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' + Pop $R0 + StrCmp $R0 0 +3 + MessageBox MB_OK|MB_ICONEXCLAMATION "Die Installation läuft bereits." + Abort + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_net.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "vpndial_settings_cert.ini" +FunctionEnd + +Function SetupPage1 + ; custom page + ; see: http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html#customPages + ; and: http://nsis.sourceforge.net/Docs/InstallOptions/Readme.html + !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings.ini" +FunctionEnd + +Function SetupPage2 + !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_net.ini" +FunctionEnd + +Function SetupPage3 + !insertmacro MUI_HEADER_TEXT "VpnDial Einstellungen" "Bitte füllen Sie folgende Angaben aus" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "vpndial_settings_cert.ini" +FunctionEnd + + +; -------------------------------- +; The stuff to install +; -------------------------------- + +Section + + ;Get Parameter from vpndial_settings.ini + + ;Get Connectionname + !insertmacro MUI_INSTALLOPTIONS_READ $connectionname "vpndial_settings.ini" "Field 2" "State" + ;MessageBox MB_OK $R1 + ;StrCpy $connectionname $R1 + + ;Get Destination_host + !insertmacro MUI_INSTALLOPTIONS_READ $destination_host "vpndial_settings.ini" "Field 3" "State" + ;MessageBox MB_OK $R2 + ;StrCpy $destination_host $R2 + + ;Get Username + !insertmacro MUI_INSTALLOPTIONS_READ $username "vpndial_settings.ini" "Field 4" "State" + + ;Get Password + !insertmacro MUI_INSTALLOPTIONS_READ $userpass "vpndial_settings.ini" "Field 8" "State" + + ;------------------------------------------------------------------------------------------------------------- + + ;Get Parameter from vpndial_settings_net.ini + + ;Get Destination_net + !insertmacro MUI_INSTALLOPTIONS_READ $R1 "vpndial_settings_net.ini" "Field 2" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $R2 "vpndial_settings_net.ini" "Field 3" "State" + !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 + + !insertmacro MUI_INSTALLOPTIONS_READ $cacert "vpndial_settings_cert.ini" "Field 2" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $usercert "vpndial_settings_cert.ini" "Field 3" "State" + +SectionEnd + +Section + SetShellVarContext all + Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk + Push "[$connectionname]" + Call FileSearch + Pop $0 #Number of times found throughout + Pop $1 #Found at all? yes/no + Pop $2 #Number of lines found in + StrCmp $1 yes 0 +3 + MessageBox MB_OK "Die Verbindung $\"$connectionname$\" existiert bereits. Der Eintrag kann leider nicht doppelt angelegt werden." + Abort +SectionEnd + +Section "VpnDial" IDX_VpnDial + + SetOverwrite on + + SetDetailsPrint both + DetailPrint "Installiere VpnDial..." + + ;SectionIn RO + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + ;CreateDirectory $INSTDIR\certs\ + + ; Put file there + File /r "vpndial\*.*" + + ; Write the installation path into the registry + WriteRegStr HKLM Software\NSIS_VpnDial "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "DisplayName" "VpnDial" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" "NoRepair" 1 + WriteUninstaller "uninstall.exe" + +SectionEnd + + +; --------------------------------------------------------------------------- +; pbk-Datei anpassen +; --------------------------------------------------------------------------- + +; Verbindungsname +Section + DetailPrint "Installiere VPN-Verbindung..." + Push "[##connectionname##]" #-- text to be replaced within the " " + Push "[$connectionname]" #-- 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 + +; Gegenstelle +Section + Push "PhoneNumber=##destinationhost##" #-- text to be replaced within the " " + Push "PhoneNumber=$destination_host" #-- 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 + +; 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 + Push $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk + Push $INSTDIR\pbk\connection.pbk + Call JoinFiles + CopyFiles $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk $INSTDIR\pbk\rasphone_orig.pbk + CopyFiles $INSTDIR\pbk\rasphone.pbk $APPDATA\Microsoft\Network\Connections\Pbk\rasphone.pbk + SetShellVarContext current +SectionEnd + +Section +nsExec::Exec "$INSTDIR\bin\VpnDial.exe --setup $connectionname --user $username --pass $userpass" +SectionEnd + +Section +;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $INSTDIR\certs\$cacert -s -r localMachine root" +;nsExec::Exec "$INSTDIR\bin\certmgr.exe -add -c $cacert -s -r localMachine root" +SectionEnd + +Section +;nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $INSTDIR\certs\$usercert -c LOCAL_MACHINE\My -a $currentuser" +nsExec::Exec "$INSTDIR\bin\winhttpcertcfg.exe -g -i $usercert -c LOCAL_MACHINE\My -a $currentuser" +SectionEnd + +; Optional section (can be disabled by the user) +Section "Startmenü-Einträge" IDX_STARTMENU + + SetDetailsPrint both + DetailPrint "Installiere Startmenü-Einträge und Desktop-Verknüpfungen..." + + CreateDirectory "$SMPROGRAMS\VpnDial" + CreateShortCut "$SMPROGRAMS\VpnDial\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\VpnDial\VpnMonitor.lnk" "$INSTDIR\bin\VpnDial.exe" "--gui --up --monitor $connectionname --net $destination_net" "$INSTDIR\bin\VpnDial.exe" 0 + CreateShortCut "$SMPROGRAMS\VpnDial\VpnDial.lnk" "$INSTDIR\bin\VpnDial.exe" "--dial $connectionname --net $destination_net" "$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 + CreateShortCut "$SMPROGRAMS\VpnDial\Zertifikate.lnk" "$INSTDIR\certs\" "" "$INSTDIR\certs\" 0 + CreateShortCut "$SMPROGRAMS\VpnDial\ZertifikatsVerwaltung.lnk" "$INSTDIR\links\IPSec.msc" "" "$INSTDIR\links\IPSec.msc" 0 + ;CreateShortCut "$SMPROGRAMS\VpnDial\README.lnk" "$INSTDIR\doc\README.txt" "" "$INSTDIR\doc\README.txt" 0 + ;CreateShortCut "$SMPROGRAMS\VpnDial\README-HTML.lnk" "$INSTDIR\doc\README.htm" "" "$INSTDIR\doc\README.htm" 0 + + CopyFiles "$INSTDIR\links\Netzwerkverbindung*" "$SMPROGRAMS\VpnDial\" + +SectionEnd + + +; -------------------------------- +; Uninstaller +; -------------------------------- + +Section "Uninstall" IDX_UNINSTALL + + ; ------------------ + ; uninstall VpnDial + ; ------------------ + + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VpnDial" + DeleteRegKey HKLM SOFTWARE\NSIS_VpnDial + + ;Remove files and uninstaller + ;Delete $INSTDIR\makensisw.exe + ;Delete $INSTDIR\uninstall.exe + ;Delete "$INSTDIR\*.*" + + ; Remove shortcuts, if any + Delete "$SMPROGRAMS\VpnDial\*.*" + + ; Remove directories used + RMDir /r "$SMPROGRAMS\VpnDial" + RMDir /r "$INSTDIR" + +SectionEnd