From 9fa19eed509f0b61492f7e5548281d9af5148f3b Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 1 Feb 2014 14:36:38 +0100 Subject: [PATCH] uninstall all old msvc of the msvc incarnation before install the new release to work around the another verison of product installed bug --- CLIENT_DATA/MSVC05_x64_Install.cmd | 41 ++++++++++++++++++++++ CLIENT_DATA/MSVC05_x86_Install.cmd | 56 ++++++++++++++++++++++++++++++ CLIENT_DATA/MSVC08_x64_Install.cmd | 41 ++++++++++++++++++++++ CLIENT_DATA/MSVC08_x86_Install.cmd | 56 ++++++++++++++++++++++++++++++ builder-targets-cb.sh | 7 +++- 5 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 CLIENT_DATA/MSVC05_x64_Install.cmd create mode 100644 CLIENT_DATA/MSVC05_x86_Install.cmd create mode 100644 CLIENT_DATA/MSVC08_x64_Install.cmd create mode 100644 CLIENT_DATA/MSVC08_x86_Install.cmd diff --git a/CLIENT_DATA/MSVC05_x64_Install.cmd b/CLIENT_DATA/MSVC05_x64_Install.cmd new file mode 100644 index 0000000..30a7db7 --- /dev/null +++ b/CLIENT_DATA/MSVC05_x64_Install.cmd @@ -0,0 +1,41 @@ +@Echo off +if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) + +"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( +goto :checkok +) || ( +echo ------- +echo *** WARNING *** +echo ------- +echo. +echo. +echo ADMINISTRATOR PRIVILEGES NOT DETECTED! +echo ______________________________________ +echo. +echo This script must be able to run with administrator +echo privileges. +echo. +echo To do so, right click on this script and select 'Run As Administrator' +echo. +echo. +echo Press any key to exit... +pause >nul +goto :eof +) + +:checkok + +if exist "%temp%\list.txt" (del "%temp%\list.txt") + +echo Uninstalling existing Visual C++ %arch% Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2005 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +"%windir%\system32\msiexec.exe" /i vcredist.msi /q transforms=2k5-x64.mst + +:eof diff --git a/CLIENT_DATA/MSVC05_x86_Install.cmd b/CLIENT_DATA/MSVC05_x86_Install.cmd new file mode 100644 index 0000000..1741c3b --- /dev/null +++ b/CLIENT_DATA/MSVC05_x86_Install.cmd @@ -0,0 +1,56 @@ +@Echo off +if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) + +"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( +goto :checkok +) || ( +echo ------- +echo *** WARNING *** +echo ------- +echo. +echo. +echo ADMINISTRATOR PRIVILEGES NOT DETECTED! +echo ______________________________________ +echo. +echo This script must be able to run with administrator +echo privileges. +echo. +echo To do so, right click on this script and select 'Run As Administrator' +echo. +echo. +echo Press any key to exit... +pause >nul +goto :eof +) + +:checkok + +if exist "%temp%\list.txt" (del "%temp%\list.txt") + +if %arch% neq x64 goto :x64skip +echo Uninstalling existing Visual C++ x86 Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /f "Microsoft Visual C++ 2005 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +goto :install + +:x64skip +echo Uninstalling existing Visual C++ %arch% Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2005 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +:install + +"%windir%\system32\msiexec.exe" /i vcredist.msi /q transforms=2k5-x86.mst + +:eof diff --git a/CLIENT_DATA/MSVC08_x64_Install.cmd b/CLIENT_DATA/MSVC08_x64_Install.cmd new file mode 100644 index 0000000..d94a261 --- /dev/null +++ b/CLIENT_DATA/MSVC08_x64_Install.cmd @@ -0,0 +1,41 @@ +@Echo off +if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) + +"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( +goto :checkok +) || ( +echo ------- +echo *** WARNING *** +echo ------- +echo. +echo. +echo ADMINISTRATOR PRIVILEGES NOT DETECTED! +echo ______________________________________ +echo. +echo This script must be able to run with administrator +echo privileges. +echo. +echo To do so, right click on this script and select 'Run As Administrator' +echo. +echo. +echo Press any key to exit... +pause >nul +goto :eof +) + +:checkok + +if exist "%temp%\list.txt" (del "%temp%\list.txt") + +echo Uninstalling existing Visual C++ %arch% Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +"%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x64.mst + +:eof diff --git a/CLIENT_DATA/MSVC08_x86_Install.cmd b/CLIENT_DATA/MSVC08_x86_Install.cmd new file mode 100644 index 0000000..f0d9bd2 --- /dev/null +++ b/CLIENT_DATA/MSVC08_x86_Install.cmd @@ -0,0 +1,56 @@ +@Echo off +if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) + +"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( +goto :checkok +) || ( +echo ------- +echo *** WARNING *** +echo ------- +echo. +echo. +echo ADMINISTRATOR PRIVILEGES NOT DETECTED! +echo ______________________________________ +echo. +echo This script must be able to run with administrator +echo privileges. +echo. +echo To do so, right click on this script and select 'Run As Administrator' +echo. +echo. +echo Press any key to exit... +pause >nul +goto :eof +) + +:checkok + +if exist "%temp%\list.txt" (del "%temp%\list.txt") + +if %arch% neq x64 goto :x64skip +echo Uninstalling existing Visual C++ x86 Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +goto :install + +:x64skip +echo Uninstalling existing Visual C++ %arch% Runtime Redistributables +echo (please wait as this process may take a few moments) + +reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt" + +for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) + +del "%temp%\list.txt" + +:install + +"%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x86.mst + +:eof diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 5c8d34d..455825b 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -239,7 +239,12 @@ function create() { rm -rf $INST_DIR/CLIENT_DATA/Install/Packages/MSVC mv -v $INST_DIR/CLIENT_DATA/X86/MSVC $INST_DIR/CLIENT_DATA/Install/Packages/MSVC else - sed "s!mst!mst REINSTALL=ALL REINSTALLMODE=dmus!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml + sed -e "s!vcredist.msi!Install.cmd!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml + mv -v $INST_DIR/CLIENT_DATA/MSVC05_x64_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x64/msvc_05/Install.cmd + mv -v $INST_DIR/CLIENT_DATA/MSVC05_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_05/Install.cmd + sed -e "s!vc_red.msi!Install.cmd!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml + mv -v $INST_DIR/CLIENT_DATA/MSVC08_x64_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x64/msvc_08/Install.cmd + mv -v $INST_DIR/CLIENT_DATA/MSVC08_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_08/Install.cmd fi # ==========================================================================================================