From ba0f19b7e697648644cfdb02242c0b0baea0f1b3 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Thu, 10 May 2012 22:31:55 +0300 Subject: [PATCH] Installer: Fixed write error with new installs (when UAC is enabled) --- Build/Installer/Installer.nsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Build/Installer/Installer.nsi b/Build/Installer/Installer.nsi index a4ea21c2..8fc405a4 100644 --- a/Build/Installer/Installer.nsi +++ b/Build/Installer/Installer.nsi @@ -214,6 +214,7 @@ Function .onInit StrCpy $Install64Bit $2 StrCpy $NonDefaultLanguage $3 StrCpy $LANGUAGE $4 + StrCpy $INSTDIR $5 ${EndIf} FunctionEnd @@ -222,6 +223,7 @@ Function ExchangeSettings StrCpy $2 $Install64Bit StrCpy $3 $NonDefaultLanguage StrCpy $4 $LANGUAGE + StrCpy $5 $INSTDIR HideWindow FunctionEnd @@ -681,6 +683,16 @@ SkipIniMove: ${EndIf} SetOutPath "$INSTDIR" + + ; Remove Rainmeter files mistakenly installed to root of Windows drive (old installer bug) + ${GetRoot} "$WINDIR" $0 + ${If} ${FileExists} "$0\Rainmeter.exe" + ${AndIfNot} ${FileExists} "$0\Plugins" + Delete "$0\Rainmeter.exe" + Delete "$0\Rainmeter.dll" + Delete "$0\SkinInstaller.exe" + ${EndIf} + Delete "$INSTDIR\Rainmeter.exe.config" Delete "$INSTDIR\Rainmeter.chm" Delete "$INSTDIR\Default.ini"