summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Seppänen <samuli@openvpn.net>2011-03-15 16:36:41 +0200
committerDavid Sommerseth <davids@redhat.com>2011-03-21 15:15:15 +0100
commit110e42d199e735ab1a31388c5678f59d0fa9510c (patch)
tree557380a4e24f3130474303105c88e11fda846f2a
parent0c03c731a80399998cc4b03a35ffad2961c7b369 (diff)
downloadopenvpn-110e42d199e735ab1a31388c5678f59d0fa9510c.zip
openvpn-110e42d199e735ab1a31388c5678f59d0fa9510c.tar.gz
openvpn-110e42d199e735ab1a31388c5678f59d0fa9510c.tar.xz
Fixes to win/openvpn.nsi
Added support for generating installer with unsigned TAP drivers. Fixed Windows Vista/7 Start menu shortcut uninstall failure. Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: James Yonan <james@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
-rwxr-xr-xwin/openvpn.nsi19
1 files changed, 17 insertions, 2 deletions
diff --git a/win/openvpn.nsi b/win/openvpn.nsi
index cbae21a..12226d5 100755
--- a/win/openvpn.nsi
+++ b/win/openvpn.nsi
@@ -7,6 +7,12 @@
; OpenVPN install script for Windows, using NSIS
+; Start menu entries don't get uninstalled properly on Windows Vista/7 unless we
+; explicitly state that the installer requires admin privileges. This is
+; caused by backwards compatibility tricks used on those platforms. For details,
+; see http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista
+RequestExecutionLevel admin
+
SetCompressor lzma
!include "MUI.nsh"
@@ -394,7 +400,9 @@ Section "TAP Virtual Ethernet Adapter" SecTAP
File "${GEN}\amd64\OemWin2k.inf"
File "${GEN}\amd64\${TAPDRV}"
- File "${GEN}\amd64\${PRODUCT_TAP_ID}.cat"
+
+ # Don't try to install TAP driver signature if it does not exist.
+ File /nonfatal "${GEN}\amd64\${PRODUCT_TAP_ID}.cat"
goto tapend
@@ -408,7 +416,9 @@ tap-32bit:
SetOutPath "$INSTDIR\driver"
File "${GEN}\i386\OemWin2k.inf"
File "${GEN}\i386\${TAPDRV}"
- File "${GEN}\i386\${PRODUCT_TAP_ID}.cat"
+
+ # Don't try to install TAP driver signature if it does not exist.
+ File /nonfatal "${GEN}\i386\${PRODUCT_TAP_ID}.cat"
tapend:
@@ -428,6 +438,8 @@ SectionEnd
Section "Add Shortcuts to Start Menu" SecAddShortcuts
+ ; Required to handle shortcuts properly on Vista/7
+ SetShellVarContext all
SetOverwrite on
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}\Documentation"
@@ -682,6 +694,9 @@ FunctionEnd
Section "Uninstall"
+ ; Required to handle shortcuts properly on Vista/7
+ SetShellVarContext all
+
; Stop OpenVPN if currently running
DetailPrint "Service REMOVE"