|
|
本帖最后由 深谷憂狼 于 2026-2-21 14:05 编辑
超高速下载,超快部署安装,完美关联各文件,完美打开QQ聊天记录的网址,完美真打开.url
@echo off
if /i "%UserName%" == "SYSTEM" (Goto GotAdmin) else (reg query "HKLM\SYSTEM\ControlSet001\Control\MiniNT" 1>nul 2>nul&&Goto GotAdmin)
:BatchGotAdmin
net session >nul 2>&1||(echo Set objShell=CreateObject^("Shell.Application"^) > "%temp%\uac.vbs"&echo objShell.ShellExecute "cmd.exe","/c ""%~f0"" %*","","runas",1 >> "%temp%\uac.vbs"&cscript //nologo "%temp%\uac.vbs"&del /f /q "%temp%\uac.vbs"&exit /b)
:GotAdmin
Pushd "%CD%"&cd /d "%~dp0"
setlocal enabledelayedexpansion
Title Google Chrome快速安装&(if exist %WinDir%\System32\ureg.dll Mode 45,05 2>nul)&Color 03
for /f %%a in ('echo prompt $E ^| cmd') do set "esc=%%a"
for /f "delims=" %%f in ('dir /s /b "%SystemDrive%\chrome.exe" 2^>nul') do (start "" "%%~f"& exit /b)
set "ChromeAppDir=%ProgramFiles%\Google\Chrome\Application"
set "chromeExe=%ProgramFiles%\Google\Chrome\Application\chrome.exe"
set "aria2c="
for %%d in (%SystemDrive:~0,1% C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%d:\" for /f "delims=" %%f in ('dir /s/b/a-d "%%d:\aria2c.exe" 2^>nul ^| find /v /i "\$Recycle.Bin\"') do set "aria2c=%%f" >nul 2>&1&goto found aria2c
:found aria2c
set "7z="
for %%d in (%SystemDrive:~0,1% C D E F G H I J K L M N O P Q R S T U V W X Y Z)do if exist "%%d:\" for /f "delims=" %%f in ('dir /s/b/a-d "%%d:\7z.exe" 2^>nul^|find /v /i "\$Recycle.Bin\"')do if exist "%%~dpf7z.dll" if exist "%%~dpf7zG.exe" (set "7z=%%f"&goto found 7Z)
:found 7Z
if not defined 7z goto OLD
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion|findstr "6.1">nul&&goto OLD
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Set bit=64) else Set bit=
set "ChromeUrl=https://dl.google.com/tag/s/installdataindex/update2/installers/ChromeStandaloneSetup%bit%.exe"
Set "ChromeSetup=ChromeStandaloneSetup%bit%.exe"
echo %esc%[94m正在高速下载……%esc%[0m
if not exist "!ChromeSetup!" (aria2c -h >nul 2>&1&&aria2c -x16 -s16 -k2M --file-allocation=none --console-log-level=notice --check-certificate=false --follow-torrent=false -o "!ChromeSetup!" "!ChromeUrl!"||curl -V >nul 2>&1&&curl "!ChromeUrl!" -L -o "!ChromeSetup!" -# --connect-timeout 5 --max-time 60 -k||(echo %esc%[91m下载失败%esc%[0m&timeout /t 3 /nobreak >nul&exit /b))
echo %esc%[94m快速部署安装……%esc%[0m
:UNZIP
"!7z!" x "%ChromeSetup%" -o"%~dp0" -y -aoa -bd -mm=ultra-fast -mx0 >>nul
"!7z!" x "%~dp0updater.7z" -o"%~dp0" -y -aoa -bd -mm=ultra-fast -mx0 >>nul
for /f "delims=" %%i in ('dir /s /b "%~dp0bin\*chrome*.exe"') do ("!7z!" x "%%i" -o"%~dp0" -y -aoa -bd -mm=ultra-fast -mx0 >>nul
"!7z!" x "%~dp0chrome.7z" -o"%~dp0" -y -aoa -bd -mm=ultra-fast -mx0 >>nul
echo d|xcopy "%~dp0Chrome-bin" "!ChromeAppDir!" /E /Q /H /R /Y >nul 2>&1
)
for %%i in (bin Chrome-bin chrome.7z ChromeStandaloneSetup64.exe updater.7z) do (
if exist "%~dp0%%i\" rd /s /q "%~dp0%%i" >nul 2>&1
if exist "%~dp0%%i" del /f /q /a "%~dp0%%i" >nul 2>&1
)
Goto Setting
:OLD
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
Set "bit=nvwf3mhcdg76ot6qwp75ovmh2u"
) else (
Set "bit=p5iizujxrjjggjfl7d4kvj5e5i"
)
set "URL=https://dl.google.com/release2/chrome/%bit%_109.0.5414.168/109.0.5414.168_chrome_installer.exe"
set "ChromeSetupold=chrome_installer.exe"
if not exist "!ChromeSetupold!" (!aria2c! -x16 -s16 -k2M --file-allocation=none --console-log-level=notice --check-certificate=false --follow-torrent=false -o "!ChromeSetupold!" "!Url!"||curl -V >nul 2>&1&&curl "!Url!" -L -o "!ChromeSetupold!" -s -k||(echo %esc%[91m下载失败%esc%[0m&timeout /t 3 /nobreak >nul&exit /b))
start /wait "" "!ChromeSetupold!" /silent /install /system-level >nul 2>&1
del /f /q "!ChromeSetupold!" >nul 2>&1
:Setting
if exist "!chromeExe!" (echo %esc%[92m安装成功,进行配置及关联%esc%[0m)
if not exist "!chromeExe!" (echo %esc%[91m安装失败%esc%[0m&&timeout /t 3 /nobreak >nul&exit /b)
taskkill /f /im "google*.exe" >nul 2>&1
timeout /t 1 /nobreak >nul
rd /s /q "!ChromeAppDir!\SetupMetrics" >nul 2>&1
rd /s /q "%ProgramFiles(x86)%\Google" >nul 2>&1
for /d %%v in ("%ChromeAppDir%\*.*") do (
if exist "%%v\locales\" (
for %%f in ("%%v\locales\*.pak") do (
if /i not "%%~nf"=="zh-CN" if /i not "%%~nf"=="en-US" (
del /f /q "%%f" >nul 2>&1
)
)
)
)
del /f /q "%USERPROFILE%\Desktop\*Google*.lnk" "%USERPROFILE%\Desktop\*Chrome*.lnk" "%PUBLIC%\Desktop\*Google*.lnk" "%PUBLIC%\Desktop\*Chrome*.lnk" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Google*.lnk" "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Google*.lnk" >nul 2>&1
rd /s /q "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Google Chrome" >nul 2>&1
md "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Google" >nul 2>&1
set "LnkName=Google Chrome"
set "ChromeParams=--profile-directory=Default https://www.baidu.com"
set "LnkDesc=网页浏览器"
set "PubDesktop=%PUBLIC%\Desktop\!LnkName!"
set "PubProgram=%ProgramData%\Microsoft\Windows\Start Menu\Programs\Google\!LnkName!"
md "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Google" >nul 2>&1
call :CreateLnk "!PubDesktop!.lnk" "!chromeExe!" "!ChromeParams!" "!chromeExe!" "0" "!LnkDesc!" "!ChromeAppDir!" "3"
call :CreateLnk "!PubProgram!.lnk" "!chromeExe!" "!ChromeParams!" "!chromeExe!" "0" "!LnkDesc!" "!ChromeAppDir!" "3"
if not exist "!PubDesktop!.lnk" (
Shortcut.exe "!PubDesktop!.lnk" "!chromeExe!" "!ChromeParams!" "!chromeExe!" "0" nor "" "!LnkDesc!"
Shortcut.exe "!PubProgram!.lnk" "!chromeExe!" "!ChromeParams!" "!chromeExe!" "0" nor "" "!LnkDesc!"
)
if not exist "!PubDesktop!.lnk" (
PECMD LINK !PubDesktop!,!chromeExe!,!ChromeParams!,!chromeExe!,!LnkDesc!
PECMD LINK !PubProgram!,!chromeExe!,!ChromeParams!,!chromeExe!,!LnkDesc!
)
if not exist "!PubDesktop!.lnk" (
mklink "!PubDesktop!" "!chromeExe!" >nul 2>&1
mklink "!PubProgram!" "!chromeExe!" >nul 2>&1
)
::echo d|xcopy "%PUBLIC%\Desktop\Google Chrome.lnk" "%systemdrive%\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts\5d696d521de238c3" /E /Q /H /R /Y >nul 2>&1
PECMD PINT !PubDesktop!.lnk , TaskBand
goto AssocChrome
:CreateLnk
(
echo Set Link=WScript.CreateObject^("WScript.Shell"^).CreateShortcut^("%~1"^)
echo Link.TargetPath="%~2"
echo Link.Arguments="%~3"
echo Link.IconLocation="%~4,%~5"
echo Link.Description="%~6"
echo Link.WorkingDirectory="%~7"
echo Link.WindowStyle="%~8"
echo Link.Save
)>"%TEMP%\WScript.vbs"
cscript //nologo "%TEMP%\WScript.vbs" >nul 2>&1
del /f /q "%TEMP%\WScript.vbs" >nul 2>&1
Exit /b
:AssocChrome
Pushd "%CD%"&cd /d "%~dp0"
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /f /v "AudioSandboxEnabled" /t REG_DWORD /d "0" 1>nul 2>nul
reg add "HKLM\SOFTWARE\WOW6432Node\Policies\Google\Chrome" /f /v "AudioSandboxEnabled" /t REG_DWORD /d "0" 1>nul 2>nul
reg add "HKCU\Software\Google\Chrome\Welcome" /v "HasSeenWelcomePage" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\Software\Policies\Google\Chrome" /v "ShowWelcomePage" /t REG_DWORD /d 0 /f >nul 2>&1
reg add "HKLM\Software\Policies\Google\Update" /v "UpdateDefault" /t REG_DWORD /d 0 /f >nul 2>&1
reg add "HKLM\Software\Policies\Google\Update" /v "DisableAutoUpdateChecks" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "DisableUpdatePrompt" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "SuppressUnsupportedOSWarning" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Update" /v "AutoUpdateCheckPeriodMinutes" /t REG_DWORD /d 0 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "SuppressUpdateNotification" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "DisableUpdateAvailableNotifications" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\SOFTWARE\Policies\Google\Chrome" /v "UpdateDisabled" /t REG_DWORD /d 1 /f >nul 2>&1
reg add "HKLM\Software\Policies\Google\Chrome" /v "DefaultBrowserSettingEnabled" /t REG_DWORD /d 0 /f >nul 2>&1
reg add "HKCU\Software\Google\Chrome" /v "SuppressDefaultBrowserPrompt" /t REG_DWORD /d 1 /f >nul 2>&1
set "EXT_ASSOC=htm html shtml xhtml mht mhtml asp aspx php jsp css js json svg xml pdf"
set "PROTO_ASSOC=http https ftp mailto"
for %%i in (%EXT_ASSOC%) do (
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%i\OpenWithProgids" /f >nul 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%i\UserChoice" /f >nul 2>&1
)
for %%p in (%PROTO_ASSOC%) do (
reg delete "HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\%%p\UserChoice" /f >nul 2>&1
)
for %%i in (%EXT_ASSOC%) do (
assoc .%%i=ChromeHTML >nul 2>&1
)
for %%i in (%EXT_ASSOC%) do (
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%i\OpenWithProgids" /v ChromeHTML /t REG_SZ /d "" /f >nul 2>&1
)
ftype ChromeHTML="!ChromeExe!" --single-argument "%%1" >nul 2>&1
reg add "HKCR\ChromeHTML\shell\open\command" /ve /d "\"!chromeExe!\" -- \"%%1\"" /f >nul 2>&1
for %%p in (%PROTO_ASSOC%) do (
ftype %%p="!ChromeExe!" --single-argument "%%1" >nul 2>&1
reg add "HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\%%p\UserChoice" /f /v "ProgId" /t REG_SZ /d "ChromeHTML"
)
reg add "HKCR\.URL" /f /ve /t REG_SZ /d "Chrome HTML" >nul 2>&1
reg add "HKCR\.URL\OpenWithProgIds" /f /v "InternetShortcut" /t REG_SZ /d "" >nul 2>&1
reg add "HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice" /f /v "Hash" /t REG_SZ /d "EDlOyJI4YAM="
reg add "HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice" /f /v "Hash" /t REG_SZ /d "1zl86D0O28Q="
:RunGoogle Chrome
Set "Google Chrome=!PubDesktop!.lnk"
@start "" "%Google Chrome%"
endlocal & Exit /b
|
评分
-
查看全部评分
|