next run on correcting msvc update

This commit is contained in:
Mario Fetka 2014-02-21 13:35:12 +01:00
parent 49cb170617
commit 700a89951d
5 changed files with 38 additions and 50 deletions

View File

@ -1,4 +1,8 @@
@Echo off @Echo off
SET VCDIR=%~dp0
cd %VCDIR%\..
SET SEDPARENTDIR=%cd%
if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86)
"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && (
@ -30,13 +34,14 @@ if exist "%temp%\list.txt" (del "%temp%\list.txt")
echo Uninstalling existing Visual C++ %arch% Runtime Redistributables echo Uninstalling existing Visual C++ %arch% Runtime Redistributables
echo (please wait as this process may take a few moments) echo (please wait as this process may take a few moments)
wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list.txt" wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list.txt"
%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive) for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive)
del "%temp%\list.txt" del "%temp%\list.txt"
"%windir%\system32\msiexec.exe" /i vcredist.msi /q transforms=2k5-x64.mst "%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x64.mst
:eof :eof

View File

@ -1,4 +1,8 @@
@Echo off @Echo off
SET VCDIR=%~dp0
cd %VCDIR%\..
SET SEDPARENTDIR=%cd%
if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86)
"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && (
@ -27,30 +31,17 @@ goto :eof
if exist "%temp%\list.txt" (del "%temp%\list.txt") if exist "%temp%\list.txt" (del "%temp%\list.txt")
if %arch% neq x64 goto :x64skip
echo Uninstalling existing Visual C++ x86 Runtime Redistributables echo Uninstalling existing Visual C++ x86 Runtime Redistributables
echo (please wait as this process may take a few moments) 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" wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable - x86%%'" get name >>"%temp%\list.txt"
for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) %SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
for /f "skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive)
del "%temp%\list.txt" del "%temp%\list.txt"
goto :install "%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x86.mst
: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 :eof

View File

@ -1,4 +1,8 @@
@Echo off @Echo off
SET VCDIR=%~dp0
cd %VCDIR%\..
SET SEDPARENTDIR=%cd%
if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86)
"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && (
@ -30,17 +34,14 @@ if exist "%temp%\list.txt" (del "%temp%\list.txt")
echo Uninstalling existing Visual C++ %arch% Runtime Redistributables echo Uninstalling existing Visual C++ %arch% Runtime Redistributables
echo (please wait as this process may take a few moments) echo (please wait as this process may take a few moments)
rem reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt"
rem for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q)
wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x64%%'" get name >>"%temp%\list.txt" wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x64%%'" get name >>"%temp%\list.txt"
%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive) for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive)
del "%temp%\list.txt" del "%temp%\list.txt"
"%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x64.mst "%windir%\system32\msiexec.exe" /i %VCDIR%\vc_red.msi /q %VCDIR%\transforms=2k8-x64.mst
:eof :eof

View File

@ -1,4 +1,8 @@
rem @Echo off @Echo off
SET VCDIR=%~dp0
cd %VCDIR%\..
SET SEDPARENTDIR=%cd%
if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86)
"%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && (
@ -26,31 +30,18 @@ goto :eof
:checkok :checkok
if exist "%temp%\list.txt" (del "%temp%\list.txt") if exist "%temp%\list.txt" (del "%temp%\list.txt")
if exist "%temp%\list1.txt" (del "%temp%\list1.txt")
echo Uninstalling existing Visual C++ x86 Runtime Redistributables echo Uninstalling existing Visual C++ x86 Runtime Redistributables
echo (please wait as this process may take a few moments) echo (please wait as this process may take a few moments)
rem reg query hklm\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt"
rem for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q)
wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x86%%'" get name >>"%temp%\list.txt" wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x86%%'" get name >>"%temp%\list.txt"
setLocal EnableDelayedExpansion %SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
set name=%~1
for /f "tokens=* delims= " %%a in ('type "%temp%\list.txt"') do (
set str=%%a
set str=!str:###=%name%!
echo !str! >> "%temp%\list1.txt"
)
for /f "skip=1 delims=" %%a in ('type "%temp%\list1.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive) for /f "skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive)
for /f "skip=1 delims=" %%a in ('type "%temp%\list1.txt"') do (echo "%%a")
del "%temp%\list.txt" del "%temp%\list.txt"
del "%temp%\list1.txt"
rem "%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x86.mst "%windir%\system32\msiexec.exe" /i %VCDIR%\vc_red.msi /q %VCDIR%\transforms=2k8-x86.mst
:eof :eof

View File

@ -215,8 +215,8 @@ function create() {
if [ "$RICKTENDONET40UPDATE" = "1" ]; then if [ "$RICKTENDONET40UPDATE" = "1" ]; then
rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.0/* rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.0/*
7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[19]} 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[21]}
#7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[20]} #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[22]}
mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.0/package.xml mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.0/package.xml
else else
rm $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml rm $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml
@ -224,8 +224,8 @@ function create() {
if [ "$RICKTENDONET45UPDATE" = "1" ]; then if [ "$RICKTENDONET45UPDATE" = "1" ]; then
rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/* rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/*
7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[21]} 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[23]}
#7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[22]} #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[24]}
mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/package.xml mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/package.xml
else else
rm $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml rm $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml
@ -240,9 +240,9 @@ function create() {
mv -v $INST_DIR/CLIENT_DATA/X86/MSVC $INST_DIR/CLIENT_DATA/Install/Packages/MSVC mv -v $INST_DIR/CLIENT_DATA/X86/MSVC $INST_DIR/CLIENT_DATA/Install/Packages/MSVC
else else
mv -v $INST_DIR/CLIENT_DATA/X86/sed/bin $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/sed mv -v $INST_DIR/CLIENT_DATA/X86/sed/bin $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/sed
sed -e "s!vcredist.msi!Install.cmd!" -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_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 # 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 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_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 mv -v $INST_DIR/CLIENT_DATA/MSVC08_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_08/Install.cmd