2023-03-09 16:57:38 +01:00
|
|
|
@echo off
|
|
|
|
call check-for-admin
|
|
|
|
if %ERRORLEVEL% neq 0 exit /b
|
|
|
|
|
|
|
|
set OPT=..\optional
|
|
|
|
set SOFTWARE=..\software
|
|
|
|
set MSI=chrome-setup.msi
|
|
|
|
set CONFIG=config\chrome.reg
|
|
|
|
set SCRIPTS=..\scripts
|
|
|
|
|
|
|
|
if NOT EXIST %SOFTWARE%\%MSI% (
|
|
|
|
echo ERROR: %SOFTWARE%\%MSI% not found!
|
|
|
|
exit /b
|
|
|
|
)
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
|
|
|
cd %SOFTWARE%
|
|
|
|
msiexec /uninstall %MSI% /passive
|
2023-03-09 21:13:11 +01:00
|
|
|
@echo on
|
2023-03-09 16:57:38 +01:00
|
|
|
msiexec /i %MSI% /passive
|
|
|
|
@echo off
|
|
|
|
cd %OPT%
|
|
|
|
|
|
|
|
echo importing registry settings ...
|
|
|
|
reg import %CONFIG%
|
|
|
|
|
2023-03-09 21:13:11 +01:00
|
|
|
rem unpin chrome icon from taskbar ...
|
|
|
|
echo.
|
2023-03-09 16:57:38 +01:00
|
|
|
call %SCRIPTS%\unpin-taskbar-icons.cmd
|
2023-03-09 21:13:11 +01:00
|
|
|
echo.
|
2023-03-09 16:57:38 +01:00
|
|
|
|
|
|
|
echo disabling update tasks ...
|
|
|
|
schtasks /Change /TN "GoogleUpdateTaskMachineCore{FF03DE7D-B6BB-4BD9-B599-5500A9284F84}" /disable
|
|
|
|
schtasks /Change /TN "GoogleUpdateTaskMachineUA{947CFA0A-AC3E-424D-99CD-38EE819AB072}" /disable
|
|
|
|
|
2023-03-09 21:13:11 +01:00
|
|
|
echo renaming chrome desktop shortcut ...
|
|
|
|
move /Y %PUBLIC%\Desktop\"Google Chrome.lnk" %PUBLIC%\Desktop\Chrome.lnk 2>nul
|
|
|
|
|
|
|
|
echo sleeping 5 seconds ...
|
|
|
|
ping 127.0.0.1 -n 5 > NUL 2>&1
|
|
|
|
|
|
|
|
echo cleanup ...
|
|
|
|
del /F /Q "%USERPROFILE%\Desktop\Google Chrome.lnk" 2>nul
|
|
|
|
|
2023-03-09 16:57:38 +01:00
|
|
|
rem refresh desktop (W10 style)
|
|
|
|
ie4uinit.exe -show
|
|
|
|
|
|
|
|
rem ###
|
|
|
|
rem rd /S /Q %USERPROFILE%"\AppData\Local\Google\Chrome\User Data\Default\Cache"
|
|
|
|
rem del /F /Q %USERPROFILE%"\AppData\Local\Google\Chrome\User Data\Default\History*"
|
|
|
|
rem ###
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
pause
|
|
|
|
|