|
发一下我的将便携版centbrowser设置为默认浏览器的批处理,供参考
@ECHO OFF & PUSHD "%~DP0" & setlocal ENABLEDELAYEDEXPANSION
fltmc>nul||mshta vbscript:CreateObject("Shell.Application").ShellExecute("%~dpnx0","%*",,"runas",1)(window.close)&&exit
set "exe=%~dp0chrome.exe"
set "pid=CentHTM"
set "ext=htm html mht mhtm mhtml pdf shtm shtml svg xht xhtml xml"
ver | findstr /i "10." > nul
if %errorlevel% equ 0 (
for %%i in (%ext%) do %~dp0SFTA.exe --reg "%exe%" ".%%i"
%~dp0SFTA.exe --reg "%exe%" "http" "%pid%"
%~dp0SFTA.exe --reg "%exe%" "https" "%pid%"
%~dp0SFTA.exe --reg "%exe%" "mms" "%pid%"
) else (
for %%i in (%ext%) do assoc .%%i=%pid%
ftype %pid% ="%exe%" "%%1"
REG ADD HKCU\Software\Classes\http\shell\open\command /ve /d "\"%exe%\" -- \"%1\"" /f
REG ADD HKCU\Software\Classes\https\shell\open\command /ve /d "\"%exe%\" -- \"%1\"" /f
REG ADD HKCU\Software\Classes\mms\shell\open\command /ve /d "\"%exe%\" -- \"%1\"" /f
)
reg add "HKCR\CentHTM" /ve /t REG_SZ /d "Cent HTML Document" /f
reg add "HKCR\CentHTM" /v "AppUserModelId" /t REG_SZ /d "CentBrowser" /f
reg add "HKCR\CentHTM\Application" /v "AppUserModelId" /t REG_SZ /d "CentBrowser" /f
reg add "HKCR\CentHTM\Application" /v "ApplicationIcon" /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe,0" /f
reg add "HKCR\CentHTM\Application" /v "ApplicationName" /t REG_SZ /d "Cent Browser" /f
reg add "HKCR\CentHTM\Application" /v "ApplicationDescription" /t REG_SZ /d "访问互联网" /f
reg add "HKCR\CentHTM\Application" /v "ApplicationCompany" /t REG_SZ /d "Cent Studio" /f
reg add "HKCR\CentHTM\DefaultIcon" /ve /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe,0" /f
reg add "HKCR\CentHTM\shell\open\command" /ve /t REG_SZ /d "\"C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe\" --single-argument %%1" /f
reg add "HKCU\Software\Clients\StartMenuInternet" /ve /t REG_SZ /d "CentBrowser" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser" /ve /t REG_SZ /d "Cent Browser" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Cent Browser 是一款可高速运行网页和应用的网络浏览器。它快捷、稳定且易于使用。Cent Browser 内置的防护恶意软件和网上诱骗的功能可让您更安全地浏览网页。" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities" /v "ApplicationIcon" /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe,0" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities" /v "ApplicationName" /t REG_SZ /d "Cent Browser" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".htm" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".html" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".mht" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".mhtm" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".mhtml" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".pdf" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".shtm" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".shtml" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".svg" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".webp" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".xht" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".xhtml" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\FileAssociations" /v ".xml" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\Startmenu" /v "StartMenuInternet" /t REG_SZ /d "CentBrowser" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\URLAssociations" /v "http" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\URLAssociations" /v "https" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\Capabilities\URLAssociations" /v "mms" /t REG_SZ /d "CentHTM" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\DefaultIcon" /ve /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe,0" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\InstallInfo" /v "ReinstallCommand" /t REG_SZ /d "\"C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe\" --make-default-browser" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\InstallInfo" /v "HideIconsCommand" /t REG_SZ /d "\"C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe\" --hide-icons" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\InstallInfo" /v "ShowIconsCommand" /t REG_SZ /d "\"C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe\" --show-icons" /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\InstallInfo" /v "IconsVisible" /t REG_DWORD /d 00000001 /f
reg add "HKCU\Software\Clients\StartMenuInternet\CentBrowser\shell\open\command" /ve /t REG_SZ /d "\"C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe\"" /f
reg add "HKCU\Software\RegisteredApplications" /v "CentBrowser" /t REG_SZ /d "Software\\Clients\\StartMenuInternet\\CentBrowser\\Capabilities" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe" /ve /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser\\chrome.exe" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe" /v "Path" /t REG_SZ /d "C:\\Windows\\Temp\\app\\centbrowser" /f
exit
|
|