|
试试 Smine 大神的批处理:(注意里面的路径)
rem init App
if not exist "%ProgramFiles%\Chrome\App" md "%ProgramFiles%\Chrome\App"
if not exist "%temp%\Chrome\Cache" md "%temp%\Chrome\Cache"
rem test readonly
mklink /d "%~dp0Cache" "%temp%\Chrome\Cache"
if exist "%~dp0Cache" (
call :linkTemp
rem pdf
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\Application" /v "ApplicationIcon" /d "\"%~dp0App\Chrome.exe\",0" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\DefaultIcon" /ve /d "\"%~dp0App\Chrome.exe\",0" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command" /ve /d "\"%~dp0App\Chrome.exe\" \"%%1\"" /f
) else (
xcopy "%~dp0*" "%ProgramFiles%\Chrome\" /y /s /h /r /k /e
mklink /d "%ProgramFiles%\Chrome\Cache" "%temp%\Chrome\Cache"
PECMD LINK "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\网络\Google Chrome","%ProgramFiles%\Chrome\App\Chrome.exe",,
PECMD LINK "X:\Users\Public\Desktop\Google Chrome","%ProgramFiles%\Chrome\App\Chrome.exe",,
rem pdf
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\Application" /v "ApplicationIcon" /d "\"%ProgramFiles%\Chrome\App\Chrome.exe\",0" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\DefaultIcon" /ve /d "\"%ProgramFiles%\Chrome\App\Chrome.exe\",0" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command" /ve /d "\"%ProgramFiles%\Chrome\App\Chrome.exe\" \"%%1\"" /f
)
goto :end
:linkTemp
call :link "AutofillStates"
call :link "BrowserMetrics"
call :link "CertificateRevocation"
call :link "Crashpad"
call :link "Crowd Deny"
call :link "ECSerivceProvidersConfig"
call :link "FileTypePolicies"
call :link "Floc"
call :link "GrShaderCache"
call :link "InterventionPolicyDatabase"
call :link "MEIPreload"
call :link "OriginTrials"
call :link "pnacl"
call :link "RecoveryImproved"
call :link "Safe Browsing"
call :link "SafetyTips"
call :link "ShaderCache"
call :link "SSLErrorAssistant"
call :link "Subresource Filter"
call :link "SwReporter"
call :link "ThirdPartyModuleList64"
call :link "TLSDeprecationConfig"
call :link "WidevineCdm"
call :link "ZxcvbnData"
goto :end
:link
set f=%1
set f=%f:"=%
if exist "%~dp0Data\%f%" rd /s /q "%~dp0Data\%f%"
if not exist "%temp%\Chrome\Data\%f%" md "%temp%\Chrome\Data\%f%"
mklink /d "%~dp0Data\%f%" "%temp%\Chrome\Data\%f%"
goto :end
:end
如不行,再加一个注册表:设为默认浏览器
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.html]
@="ChromeHTML"
[HKEY_CLASSES_ROOT\.htm]
@="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.HTM\OpenWithList]
"a"="Chrome.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.HTM\OpenWithProgids]
"ChromeHTML"=hex(0):
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.HTM\UserChoice]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.HTM\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\OpenWithList]
"a"="Chrome.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\OpenWithProgids]
"ChromeHTML"=hex(0):
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\OpenWithList]
"a"="Chrome.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\OpenWithProgids]
"ChromeHTML"=hex(0):
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\UserChoice]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mht\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\OpenWithList]
"a"="Chrome.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\OpenWithProgids]
"ChromeHTML"=hex(0):
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\UserChoice]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mhtml\UserChoice]
"ProgId"="ChromeHTML"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToasts]
"ChromeHTML_.htm"=dword:00000000
"ChromeHTML_.html"=dword:00000000
|
|