Bump flash security
This commit is contained in:
@@ -30,9 +30,10 @@ 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)
|
||||
wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list.txt"
|
||||
|
||||
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"
|
||||
|
||||
|
||||
@@ -30,9 +30,14 @@ 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"
|
||||
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"
|
||||
|
||||
for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive)
|
||||
|
||||
for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q)
|
||||
|
||||
del "%temp%\list.txt"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@Echo off
|
||||
rem @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 && (
|
||||
@@ -26,31 +26,32 @@ goto :eof
|
||||
:checkok
|
||||
|
||||
if exist "%temp%\list.txt" (del "%temp%\list.txt")
|
||||
if exist "%temp%\list1.txt" (del "%temp%\list1.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"
|
||||
rem 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)
|
||||
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"
|
||||
|
||||
setLocal EnableDelayedExpansion
|
||||
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%\list1.txt"') do (echo "%%a")
|
||||
|
||||
pause
|
||||
del "%temp%\list.txt"
|
||||
del "%temp%\list1.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
|
||||
rem "%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x86.mst
|
||||
|
||||
:eof
|
||||
|
||||
Reference in New Issue
Block a user