You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

34 lines
760 B

@echo off
cls
taskkill /f /im outlook.exe >nul 2>&1
rmdir /S /Q "%localappdata%\Microsoft\Outlook\Offline Address Books\"
pushd %~dp0
wmic product where "Name like '%%Office%%'" get Name, Version >> temp.txt
find "2010" temp.txt > nul
if %errorlevel% == 0 goto 2010
find "2013" temp.txt > nul
if %errorlevel% == 0 goto 2013
find "2016" temp.txt > nul
if %errorlevel% == 0 goto 2016
:2010
REG ADD "HKCU\Software\Microsoft\Office\14.0\Outlook\Cached Mode" /v DownloadOAB /t REG_DWORD /d 0
goto end
:2013
REG ADD "HKCU\Software\Microsoft\Office\15.0\Outlook\Cached Mode" /v DownloadOAB /t REG_DWORD /d 0
goto end
:2016
REG ADD "HKCU\Software\Microsoft\Office\16.0\Outlook\Cached Mode" /v DownloadOAB /t REG_DWORD /d 0
goto end
:end
del /Q temp.txt
popd