2022年4月6日 星期三

只要點兩下,開機還原電腦停用Edge與Chrome更新


       造成電腦教室學生電腦變得很慢的兇手竟然是 Chrome 更新
        又到模擬志願選填的時候,往年總是會碰到電腦教室的學生機變得很慢。因此,導致無法讓學生在時限內完成志願選填。到底是什麼原因?後來發現學生機的Chrome 正在做更新。而且版本越舊,更新時間就越長。Chrome 更新期間,學生使用Chrome 就會變得很慢。
       已經停用了Windows 更新與Chrome更新,電腦教室學生電腦又變得很慢。造成電腦教室學生電腦變得很慢的兇手竟然是 Edge 更新。
        又到模擬志願選填的時候,往年總是會碰到電腦教室的學生機變得很慢。因此,導致無法讓學生在時限內完成志願選填。到底是什麼原因?停用了Windows 更新與Chrome更新,後來發現學生機的Edge 正在做更新。而且版本越舊,更新時間就越長。Edge 更新期間,學生使用Edge 就會變得很慢。

        在系列文章一與二中,分別停用Edge 與 Chrome 更新。這次則是希望只要點兩下,停用Edge與Chrome更新。降低滑鼠點選的次數。
檔案下載:解壓縮密碼demo1234
教學影片:

        在BAT的寫法觀念中,要特別注意的地方如下:
        %ProgramFiles%=C:\Program Files
        %ProgramFiles(x86)%=C:\Program Files (x86)

目的:停用Edge與Chrome更新
程式名稱:StopEdgeAndChromeUpdate.bat
程式內容:
@echo off
REM ---------------以下是程式碼,不需更改---------------
REM :: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
REM :: BatchGotAdmin (Run as Admin code ends)
REM :: Your codes should start from the following line
cd %ProgramFiles(x86)%\Google\Update\
if exist  GoogleUpdate.exe (
    rename GoogleUpdate.exe GoogleUpdate01.exe
)
cd %ProgramFiles(x86)%\Microsoft\EdgeUpdate\
if exist  MicrosoftEdgeUpdate.exe (
    rename MicrosoftEdgeUpdate.exe MicrosoftEdgeUpdate01.exe
)
exit

目的:啟用Edge與Chrome更新
程式名稱:StartEdgeAndChromeUpdate.bat
程式內容:
@echo off
REM ---------------以下是程式碼,不需更改---------------
REM :: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
REM :: BatchGotAdmin (Run as Admin code ends)
REM :: Your codes should start from the following line
cd %ProgramFiles(x86)%\Google\Update\
if exist  GoogleUpdate01.exe (
    rename GoogleUpdate01.exe GoogleUpdate.exe
cd %ProgramFiles(x86)%\Microsoft\EdgeUpdate\
if exist  MicrosoftEdgeUpdate01.exe (
    rename MicrosoftEdgeUpdate01.exe MicrosoftEdgeUpdate.exe
)
exit



沒有留言:

張貼留言

laravel 資料庫資料填充工廠入門

相關系列文章: 1. 在 windows 10 安裝 laravel 12 studentManagement環境與設定 2. laravel 12 route 路由 3. laravel 12 Blade Templates 網頁模版 4. laravel 12 Control...