also add workaroiund for msvc 2k5
This commit is contained in:
parent
0d6bcb54ec
commit
60c8348f8f
@ -1,9 +1,7 @@
|
|||||||
@Echo off
|
@Echo off
|
||||||
SET VCDIR=%~dp0
|
SET VCDIR=%~dp0
|
||||||
cd %VCDIR%\..
|
cd %VCDIR%\..\..\..
|
||||||
SET SEDPARENTDIR=%cd%
|
SET GNUPARENTDIR=%cd%
|
||||||
|
|
||||||
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 && (
|
||||||
goto :checkok
|
goto :checkok
|
||||||
@ -29,19 +27,29 @@ goto :eof
|
|||||||
|
|
||||||
:checkok
|
:checkok
|
||||||
|
|
||||||
if exist "%temp%\list.txt" (del "%temp%\list.txt")
|
if exist "%temp%\list0.txt" (del "%temp%\list0.txt")
|
||||||
|
if exist "%temp%\list1.txt" (del "%temp%\list1.txt")
|
||||||
|
|
||||||
echo Uninstalling existing Visual C++ %arch% Runtime Redistributables
|
echo Uninstalling existing Visual C++ 2005 x64 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 (x64)%%'" get name >>"%temp%\list0.txt"
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.txt"') do (echo "%%a")
|
||||||
|
|
||||||
wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list.txt"
|
echo Converting ucs-2 encoded list of installed products to utf-8
|
||||||
|
%GNUPARENTDIR%\GNU\iconv.exe -f UCS-2 -t UTF-8 %temp%\list0.txt > %temp%\list1.txt
|
||||||
|
echo CleanUp some errors in the list file
|
||||||
|
%GNUPARENTDIR%\GNU\sed.exe -e "s/\s*$//g" %temp%\list1.txt > %temp%\list0.txt
|
||||||
|
|
||||||
%SEDPARENTDIR%\gnu\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
|
echo start uninstalling old versions of product
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.txt"') do (echo "%%a")
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.txt"') do (wmic product where "name like '%%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)
|
echo CleanUp Tempory files
|
||||||
|
del "%temp%\list0.txt"
|
||||||
|
del "%temp%\list1.txt"
|
||||||
|
|
||||||
del "%temp%\list.txt"
|
echo Install latest version of Visual C++ 2005 x64 Runtime Redistributables
|
||||||
|
echo (please wait as this process may take a few moments)
|
||||||
"%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x64.mst
|
"%windir%\system32\msiexec.exe" /i "%VCDIR%\vcredist.msi" /q transforms="%VCDIR%\2k5-x64.mst"
|
||||||
|
|
||||||
:eof
|
:eof
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
@Echo off
|
@Echo off
|
||||||
SET VCDIR=%~dp0
|
SET VCDIR=%~dp0
|
||||||
cd %VCDIR%\..
|
cd %VCDIR%\..\..\..
|
||||||
SET SEDPARENTDIR=%cd%
|
SET GNUPARENTDIR=%cd%
|
||||||
|
|
||||||
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 && (
|
||||||
goto :checkok
|
goto :checkok
|
||||||
@ -29,19 +27,32 @@ goto :eof
|
|||||||
|
|
||||||
:checkok
|
:checkok
|
||||||
|
|
||||||
if exist "%temp%\list.txt" (del "%temp%\list.txt")
|
if exist "%temp%\list0.txt" (del "%temp%\list0.txt")
|
||||||
|
if exist "%temp%\list1.txt" (del "%temp%\list1.txt")
|
||||||
|
if exist "%temp%\list2.txt" (del "%temp%\list2.txt")
|
||||||
|
|
||||||
echo Uninstalling existing Visual C++ x86 Runtime Redistributables
|
echo Uninstalling existing Visual C++ 2005 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)
|
||||||
|
wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list0.txt"
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.txt"') do (echo "%%a")
|
||||||
|
|
||||||
wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable - x86%%'" get name >>"%temp%\list.txt"
|
echo Converting ucs-2 encoded list of installed products to utf-8
|
||||||
|
%GNUPARENTDIR%\GNU\iconv.exe -f UCS-2 -t UTF-8 %temp%\list0.txt > %temp%\list1.txt
|
||||||
|
echo CleanUp some errors in the list file
|
||||||
|
%GNUPARENTDIR%\GNU\sed.exe -e "s/\s*$//g" %temp%\list1.txt > %temp%\list2.txt
|
||||||
|
%GNUPARENTDIR%\GNU\sed.exe -e "s/x64/d" %temp%\list2.txt > %temp%\list0.txt
|
||||||
|
|
||||||
%SEDPARENTDIR%\gnu\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt"
|
echo start uninstalling old versions of product
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.txt"') do (echo "%%a")
|
||||||
|
for /f "skip=1 delims=" %%a in ('type "%temp%\list0.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)
|
echo CleanUp Tempory files
|
||||||
|
del "%temp%\list0.txt"
|
||||||
|
del "%temp%\list1.txt"
|
||||||
|
del "%temp%\list2.txt"
|
||||||
|
|
||||||
del "%temp%\list.txt"
|
echo Install latest version of Visual C++ 2005 x86 Runtime Redistributables
|
||||||
|
echo (please wait as this process may take a few moments)
|
||||||
"%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x86.mst
|
"%windir%\system32\msiexec.exe" /i "%VCDIR%\vcredist.msi" /q transforms="%VCDIR%\2k5-x86.mst"
|
||||||
|
|
||||||
:eof
|
:eof
|
||||||
|
@ -245,10 +245,10 @@ function create() {
|
|||||||
rm -rf $INST_DIR/CLIENT_DATA/Install/Packages/MSVC
|
rm -rf $INST_DIR/CLIENT_DATA/Install/Packages/MSVC
|
||||||
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
|
||||||
# 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
|
||||||
rm $INST_DIR/CLIENT_DATA/MSVC05_x86_Install.cmd $INST_DIR/CLIENT_DATA/MSVC05_x64_Install.cmd
|
# rm $INST_DIR/CLIENT_DATA/MSVC05_x86_Install.cmd $INST_DIR/CLIENT_DATA/MSVC05_x64_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
|
||||||
|
Loading…
Reference in New Issue
Block a user