49 lines
1.1 KiB
Batchfile
49 lines
1.1 KiB
Batchfile
![]() |
@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%
|
||
|
@echo on
|
||
|
msiexec /uninstall %MSI% /passive
|
||
|
msiexec /i %MSI% /passive
|
||
|
@echo off
|
||
|
cd %OPT%
|
||
|
|
||
|
echo renaming Chrome desktop shortcut ...
|
||
|
move /Y %PUBLIC%\Desktop\"Google Chrome.lnk" %PUBLIC%\Desktop\Chrome.lnk 2>nul
|
||
|
|
||
|
echo importing registry settings ...
|
||
|
reg import %CONFIG%
|
||
|
|
||
|
rem unpin chrome icon frpom taskbar ...
|
||
|
call %SCRIPTS%\unpin-taskbar-icons.cmd
|
||
|
|
||
|
echo disabling update tasks ...
|
||
|
schtasks /Change /TN "GoogleUpdateTaskMachineCore{FF03DE7D-B6BB-4BD9-B599-5500A9284F84}" /disable
|
||
|
schtasks /Change /TN "GoogleUpdateTaskMachineUA{947CFA0A-AC3E-424D-99CD-38EE819AB072}" /disable
|
||
|
|
||
|
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
|
||
|
|