From b54082a568707cd0328825792a49f3459422ca07 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 28 Jan 2014 15:59:10 +0000 Subject: [PATCH] ignored synwinxt.dll when it already exists, seems to be extremely difficult to replace dll's loaded into explorer (restarting explorer from nsis didnt work). --- res/synergy.nsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/res/synergy.nsh b/res/synergy.nsh index f529ec9f..3d0c2962 100644 --- a/res/synergy.nsh +++ b/res/synergy.nsh @@ -35,6 +35,7 @@ !include "MUI2.nsh" !include "DefineIfExist.nsh" +!include "Library.nsh" !insertmacro MUI_PAGE_LICENSE "..\\res\\License.rtf" @@ -163,7 +164,6 @@ Section "Server and Client" core File "${binDir}\Release\synergys.exe" File "${binDir}\Release\synergyc.exe" File "${binDir}\Release\synergyd.exe" - File "${binDir}\Release\synwinxt.dll" ; if the hook file exists, skip, assuming it couldn't be deleted ; because it was in use by some process. @@ -173,6 +173,14 @@ Section "Server and Client" core File "${binDir}\Release\synwinhk.dll" ${EndIf} + ; if the shell ex file exists, skip, assuming it couldn't be deleted + ; because it was in use by some process. + ${If} ${FileExists} "synwinxt.dll" + DetailPrint "Skipping synwinxt.dll, file already exists." + ${Else} + File "${binDir}\Release\synwinxt.dll" + ${EndIf} + ; windows firewall exception DetailPrint "Adding firewall exception" nsExec::ExecToStack "netsh firewall add allowedprogram $\"$INSTDIR\synergys.exe$\" Synergy ENABLE"