From 38d0e87a2e3fa55bbda9122a1d8134fb7ee5b9df Mon Sep 17 00:00:00 2001 From: David Yoder Date: Fri, 6 Dec 2024 11:12:13 -0500 Subject: [PATCH] initial commit --- Fix-DisableNewOutlookToggle.bat | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Fix-DisableNewOutlookToggle.bat diff --git a/Fix-DisableNewOutlookToggle.bat b/Fix-DisableNewOutlookToggle.bat new file mode 100644 index 0000000..edf179f --- /dev/null +++ b/Fix-DisableNewOutlookToggle.bat @@ -0,0 +1,24 @@ +@echo off +if /I %0 EQU "%~dpnx0" (set LAUNCH=1) else (set LAUNCH=0) +set PROP=HideNewOutlookToggle +set KEY=Microsoft\Office\16.0\Outlook\Options\General +set ARGS=/v %PROP% /t REG_DWORD /d 1 /f +echo Disabling New Outlook toggle... +reg add HKCU\Software\%KEY% %ARGS% /reg:32 >nul 2>nul +reg add HKCU\Software\Policies\%KEY% %ARGS% /reg:32 >nul 2>nul +reg add HKCU\Software\%KEY% %ARGS% /reg:64 >nul 2>nul +reg add HKCU\Software\Policies\%KEY% %ARGS% /reg:64 >nul 2>nul +if %ERRORLEVEL% GTR 0 ( +if %LAUNCH% GTR 0 color 0e +echo ERROR: This script failed to run. Please make sure to Run As Administrator +reg delete HKCU\Software\%KEY% /v %PROP% /f /reg:32 >nul 2>nul +reg delete HKCU\Software\Policies\%KEY% /v %PROP% /f /reg:32 >nul 2>nul +reg delete HKCU\Software\%KEY% /v %PROP% /f /reg:64 >nul 2>nul +reg delete HKCU\Software\Policies\%KEY% /v %PROP% /f /reg:64 >nul 2>nul +echo Changes have been reverted. +if %LAUNCH% GTR 0 pause +goto :EOF +) +echo Successfully disabled New Outlook toggle! +echo Please restart your comptuer. +if %LAUNCH% GTR 0 pause \ No newline at end of file