Ticket #249: 0002-Fix-to-Trac-ticket-249.patch

File 0002-Fix-to-Trac-ticket-249.patch, 1.3 KB (added by Samuli Seppänen, 12 years ago)

Fix to Trac ticket #249

  • windows-nsis/openvpn.nsi

    From 209acaca040b14917b40ffd5314cde79efe8dd7c Mon Sep 17 00:00:00 2001
    From: Samuli Seppänen <samuli@openvpn.net>
    Date: Fri, 11 Jan 2013 15:00:24 +0200
    Subject: [PATCH 2/3] Fix to Trac ticket #249
    
    ---
     windows-nsis/openvpn.nsi |   16 +++++++++-------
     1 file changed, 9 insertions(+), 7 deletions(-)
    
    diff --git a/windows-nsis/openvpn.nsi b/windows-nsis/openvpn.nsi
    index afc382f..13543f6 100755
    a b ShowUninstDetails show 
    3535;Remember install folder
    3636InstallDirRegKey HKLM "SOFTWARE\${PACKAGE_NAME}" ""
    3737
     38; This is required for silent installations to work
     39InstallDir "$PROGRAMFILES\${PACKAGE_NAME}"
     40
    3841;--------------------------------
    3942;Modern UI Configuration
    4043
    Function .onInit 
    384387
    385388        !insertmacro MULTIUSER_INIT
    386389        SetShellVarContext all
    387 
    388         ${If} "${ARCH}" == "x86_64"
    389                 SetRegView 64
    390                 StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGE_NAME}"
    391         ${Else}
    392                 StrCpy $INSTDIR "$PROGRAMFILES\${PACKAGE_NAME}"
    393         ${EndIf}
     390   
     391    ${If} "${ARCH}" == "x86_64"
     392        SetRegView 64
     393        StrCmp $INSTDIR "$PROGRAMFILES\${PACKAGE_NAME}" 0 +2
     394        StrCpy $INSTDIR "$PROGRAMFILES64\${PACKAGE_NAME}"
     395    ${EndIf}
    394396
    395397        # Delete previous start menu
    396398        RMDir /r "$SMPROGRAMS\${PACKAGE_NAME}"