optimizing
This commit is contained in:
parent
914fb9e4f8
commit
835d55b858
@ -2,7 +2,7 @@
|
||||
set TOOLS=c:\tools
|
||||
|
||||
net session >nul 2>&1
|
||||
if NOT %ERRORLEVEL% == 0 (
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: User has NO ADMINISTRATOR rights!
|
||||
exit /b
|
||||
)
|
||||
|
@ -2,16 +2,30 @@
|
||||
|
||||
set EDGEROOT="C:\Program Files (x86)\Microsoft\Edge"
|
||||
set EDGEUPDATE="C:\Program Files (x86)\Microsoft\EdgeUpdate"
|
||||
set INSTALLER=Application\84.0.522.52\Installer
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
if NOT exist %EDGEROOT%\%INSTALLER% (
|
||||
rem get path for edge setup ...
|
||||
FOR /F "skip=2 tokens=2* " %%a in ('reg query "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}" /v StubPath') do set EDGESETUP=%%b
|
||||
|
||||
if NOT %ERRORLEVEL% NEQ 0 (
|
||||
echo EDGE browser is NOT installed!
|
||||
echo ####### %0 #######
|
||||
exit /b
|
||||
)
|
||||
|
||||
rem delete everthing before the word "Application" ...
|
||||
call set EDGESETUP=%%EDGESETUP:*Application\=%%
|
||||
|
||||
rem delete everything after the \ ...
|
||||
set "EDGESETUP=%EDGESETUP:\=" & rem."%"
|
||||
|
||||
echo found EDGE version [ %EDGESETUP% ] ...
|
||||
set INSTALLER=Application\%EDGESETUP%\Installer
|
||||
|
||||
echo HIDING edge update in apps list ...
|
||||
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /v "SystemComponent" /d 1 /t REG_DWORD /f 1>nul 2>&1
|
||||
|
||||
echo UNINSTALLING edge browser ...
|
||||
%EDGEROOT%\%INSTALLER%\setup.exe --uninstall --system-level --verbose-logging --force-uninstall 2>nul
|
||||
|
||||
@ -34,8 +48,8 @@ echo BLOCKING further edge updates ...
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate" ^
|
||||
/v "DoNotUpdateToEdgeWithChromium" /d 1 /t REG_DWORD /f 1>nul 2>&1
|
||||
|
||||
echo HIDING edge update in apps list ...
|
||||
reg add "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" /v "SystemComponent" /d 1 /t REG_DWORD /f 1>nul 2>&1
|
||||
echo REMOVING install registry key ...
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}" /f > NUL 2>&1
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
|
@ -27,10 +27,10 @@ rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
|
||||
rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
|
||||
|
||||
echo removing OneDrive from explorer ...
|
||||
reg DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
|
||||
reg DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
|
||||
reg DELETE "HKEY_CURRENT_USER\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
||||
reg DELETE "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
||||
reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
|
||||
reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
|
||||
reg delete "HKEY_CURRENT_USER\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
||||
reg delete "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
||||
|
||||
echo removing OneDrive update task ...
|
||||
powershell -Command "Get-ScheduledTask | Where-Object {$_.Taskname -match 'OneDrive Standalone Update'} | Unregister-ScheduledTask -Confirm:$false"
|
||||
@ -39,9 +39,9 @@ echo KILLING all OneDrive SETUP instances ...
|
||||
taskkill /f /im OneDriveSetup.exe > NUL 2>&1
|
||||
|
||||
echo removing OneDrive setup exe ...
|
||||
setacl -on %OneDrive% -ot file -actn setowner -ownr "n:Administrators" 2>nul
|
||||
setacl -on %OneDrive% -ot file -actn ace -ace "n:Administrators;p:full" 2>nul
|
||||
del /Y %OneDrive% 2>nul
|
||||
setacl -on %OneDrive% -ot file -actn setowner -ownr "n:Administrators" 1>nul 2>nul
|
||||
setacl -on %OneDrive% -ot file -actn ace -ace "n:Administrators;p:full" 1>nul 2>nul
|
||||
del /F %OneDrive% 2>nul
|
||||
|
||||
echo ####### %0 #######
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user