|
看了别人的绿化的批处理,那才是玩得溜啊。
复制在下面,大家欣赏一下:
==================================
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
PECMD LINK "X:\ProgramData\Microsoft\Windows\Start Menu\Programs\网络\Google Chrome","%~dp0App\Chrome.exe",,
PECMD LINK "X:\Users\Public\Desktop\Google Chrome","%~dp0App\Chrome.exe",,
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
=============================== |
|