forked from matej137/OutlookRemover
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathOutlook.bat
31 lines (25 loc) · 1021 Bytes
/
Outlook.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: You need to run this as Admin!!!
pause
goto konec
)
echo Copying AppxManifest.xml to C:\Users\
copy "%~dp0AppxManifest.xml" "C:\Users\" >nul
if %errorLevel% neq 0 (
echo Error: Failed to copy the file. Check the file path and try again.
pause
goto konec
)
echo Modifying registry to allow development mode...
powershell "New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 -Force" >nul 2>nul
echo Removing Outlook appx package...
powershell "get-appxpackage -allusers Microsoft.OutlookForWindows | Remove-AppxPackage -allusers"
echo Registering AppxManifest.xml...
powershell add-appxpackage -register "C:\Users\AppxManifest.xml"
:konec