Bug 361402 - installer does not automatically find path to existing installation when going from 1.5.0.x to 2.0.0.x. r=mscott, a1.8.1.5=dveditz for release-drivers

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@229265 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rob_strong%exchangecode.com
2007-07-03 19:01:16 +00:00
parent 454f65d895
commit dbfe417a50

View File

@@ -80,6 +80,7 @@ Var fhUninstallLog
!insertmacro WordReplace
!insertmacro GetSize
!insertmacro GetParameters
!insertmacro GetParent
!insertmacro GetOptions
!insertmacro GetRoot
!insertmacro DriveSpace
@@ -107,6 +108,7 @@ VIAddVersionKey "FileDescription" "${BrandShortName} Installer"
!insertmacro CheckDiskSpace
!insertmacro GetPathFromString
!insertmacro AddHandlerValues
!insertmacro GetSingleInstallPath
!include shared.nsh
@@ -870,6 +872,17 @@ Function leaveComponents
FunctionEnd
Function preDirectory
SetShellVarContext all ; Set SHCTX to HKLM
${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
${If} $R9 == "false"
SetShellVarContext current ; Set SHCTX to HKCU
${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
${EndIf}
${Unless} $R9 == "false"
StrCpy $INSTDIR "$R9"
${EndUnless}
${If} $InstallType != 4
${CheckDiskSpace} $R9
${If} $R9 != "false"