Created
July 1, 2024 19:53
-
-
Save hrz6976/6b772d8c887ba7fa7796adc18456665c to your computer and use it in GitHub Desktop.
Try to avoid Windows Mail from constantly switching to the shi!tty new Outlook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
REM Check if Windows Mail is running | |
tasklist /FI "IMAGENAME eq HxOutlook.exe" 2>NUL | find /I /N "HxOutlook.exe">NUL | |
if "%ERRORLEVEL%"=="0" ( | |
echo HxOutlook.exe is running. Closing it... | |
taskkill /F /IM HxOutlook.exe | |
) else ( | |
echo HxOutlook.exe is not running. | |
) | |
REM Change directory to the specified path | |
cd /d "%LOCALAPPDATA%\Packages\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\LocalState" | |
REM Check if the Migration folder exists | |
if exist Migration ( | |
echo Migration folder exists. Deleting it... | |
rd /s /q Migration | |
) | |
REM Create an empty Migration file | |
echo.>Migration | |
echo Script completed. | |
endlocal | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment