From dd42d14410bfd3dc92dfc034e9ba8a85ca126cc1 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sat, 3 Jul 2010 15:10:12 +0000 Subject: [PATCH] NSIS: Fix for installer not installing VS2010 on some systems (Issue 733) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3381 96395faa-99c1-11dd-bbfe-3dabce05a288 --- nsis/pcsx2_full_install.nsi | 12 ++++++++---- nsis/pcsx2_web_install.nsi | 8 ++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/nsis/pcsx2_full_install.nsi b/nsis/pcsx2_full_install.nsi index 2f88f6269a..24b4cfea34 100644 --- a/nsis/pcsx2_full_install.nsi +++ b/nsis/pcsx2_full_install.nsi @@ -120,15 +120,19 @@ Section "Microsoft Visual C++ 2010 Redist (recommended)" SEC_CRT2010 ; Downloaded from: ; http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe + ClearErrors ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed" - IfErrors done - StrCmp $R0 "1" done + IfErrors 0 +2 + DetailPrint "Visual C++ 2010 Redistributable registry key was not found; assumed to be uninstalled." + StrCmp $R0 "1" 0 +3 + DetailPrint "Visual C++ 2010 Redistributable is already installed; skipping!" + Goto done SetOutPath "$TEMP" File "vcredist_2010_x86.exe" - DetailPrint "Running Visual C++ 2010 SP1 Redistributable Setup..." + DetailPrint "Running Visual C++ 2010 Redistributable Setup..." ExecWait '"$TEMP\vcredist_2010_x86.exe" /qb' - DetailPrint "Finished Visual C++ 2010 SP1 Redistributable Setup" + DetailPrint "Finished Visual C++ 2010 Redistributable Setup" Delete "$TEMP\vcredist_2010_x86.exe" diff --git a/nsis/pcsx2_web_install.nsi b/nsis/pcsx2_web_install.nsi index 28f803ae43..8850007ffd 100644 --- a/nsis/pcsx2_web_install.nsi +++ b/nsis/pcsx2_web_install.nsi @@ -157,9 +157,13 @@ Section "Microsoft Visual C++ 2010 Redist (required)" SEC_CRT2010 ; Downloaded from: ; http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe + ClearErrors ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed" - IfErrors done - StrCmp $R0 "1" done + IfErrors 0 +2 + DetailPrint "Visual C++ 2010 Redistributable registry key was not found; assumed to be uninstalled." + StrCmp $R0 "1" 0 +3 + DetailPrint "Visual C++ 2010 Redistributable is already installed; skipping!" + Goto done SetOutPath "$TEMP"