@ECHO OFF & CD /D %~DP0 & TITLE 绿化
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
"%TEMP%\Getadmin.vbs"
DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
Exit /b
)
taskkill /f /im Comparator * >NUL 2>NUL
taskkill /f /im FineReader * >NUL 2>NUL
taskkill /f /im FineReaderOCR * >NUL 2>NUL
taskkill /f /im ScreenshotReader * >NUL 2>NUL
::注册协议及Office加载项控件;
regsvr32 /s PXCOfficeAddin5af15.dll
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" regsvr32 /s PXCOfficeAddin5af15x64.dll=
reg add HKLM\SOFTWARE\ABBYY\FineReader\15\Integration /f /v SupportedImageFormats /d "bmp,dib,rle,dcx,djvu,djv,gif,jb2,jbig2,jp2,j2k,jpf,jpx,jpc,jpg,jpeg,pcx,pdf,png,tif,tiff,xps,wdp,wmp,hdp" >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add HKLM\SOFTWARE\Wow6432Node\ABBYY\FineReader\15\Integration /f /v SupportedImageFormats /d "bmp,dib,rle,dcx,djvu,djv,gif,jb2,jbig2,jp2,j2k,jpf,jpx,jpc,jpg,jpeg,pcx,pdf,png,tif,tiff,xps,wdp,wmp,hdp" >NUL 2>NUL
::取消首次隐私政策向导,关闭获取用户信息上报
reg delete HKCU\Software\ABBYY\FineReader /f >NUL 2>NUL
reg add HKEY_USERS\.DEFAULT\SOFTWARE\ABBYY\FineReader\15 /f /v InterfaceLanguage /d 64 >NUL 2>NUL
reg add HKEY_USERS\.DEFAULT\SOFTWARE\ABBYY\FineReader\15\PrivacyPolicy /f /v MarketingMessages /d false >NUL 2>NUL
reg add HKEY_USERS\.DEFAULT\SOFTWARE\ABBYY\FineReader\15\PrivacyPolicy /f /v TechnicalMessages /d false >NUL 2>NUL
reg add HKEY_USERS\.DEFAULT\SOFTWARE\ABBYY\FineReader\15\PrivacyPolicy /f /v CollectUserStatistic /d false >NUL 2>NUL
::关闭程序检测更新等(已放置假冒升级程序替换)
reg add HKLM\SOFTWARE\ABBYY\FineReader\15 /f /v InterfaceLanguage /d 64 >NUL 2>NUL
reg add HKLM\SOFTWARE\ABBYY\FineReader\15\Updates /f /v CheckUpdates /d false >NUL 2>NUL
reg add HKLM\SOFTWARE\ABBYY\FineReader\15\Updates /f /v InstallUpdates /d false >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add HKLM\SOFTWARE\Wow6432Node\ABBYY\FineReader\15 /f /v InterfaceLanguage /d 64 >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add HKLM\SOFTWARE\Wow6432Node\ABBYY\FineReader\15\Updates /f /v CheckUpdates /d false >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add HKLM\SOFTWARE\Wow6432Node\ABBYY\FineReader\15\Updates /f /v InstallUpdates /d false >NUL 2>NUL
::自动判断软件和语言文件所在位置
reg add "HKLM\SOFTWARE\Tracker Software\PDF-XChange 5 ABBYY FineReader15" /f /v InstallPath /d "%~dp0\" >NUL 2>NUL
reg add "HKLM\SOFTWARE\Tracker Software\PDF-XChange 5 ABBYY FineReader15" /f /v LangsPath /d "%~dp0Languages\" >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD86" reg add "HKLM\SOFTWARE\Tracker Software\PDF-XChange 5 ABBYY FineReader15" /f /v InstallPath32 /d "%~dp0\" >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add "HKLM\SOFTWARE\Wow6432Node\Tracker Software\PDF-XChange 5 ABBYY FineReader15" /f /v InstallPath /d "%~dp0\" >NUL 2>NUL
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" reg add "HKLM\SOFTWARE\Wow6432Node\Tracker Software\PDF-XChange 5 ABBYY FineReader15" /f /v LangsPath /d "%~dp0Languages\" >NUL 2>NUL
::安装打印机
rundll32 printui.dll,PrintUIEntry /if /b "PDF-XChange 5.0 for FineReader 15" /f "%~dp0Drivers\PrnInst.inf" /q
::rundll32 printui.dll,PrintUIEntry /if /b "PDF-XChange 5.0 for FineReader 15" /f "%~dp0Drivers\PrnInst.inf" /r "winspool,Ne02:" /m "PDF-XChange 5.0 for FineReader 15" /z
ECHO.&ECHO 绿化完成!创建桌面快捷方式?
ECHO.&ECHO 是敲下任意键,否直接关闭呗!&PAUSE >NUL 2>NUL
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\ABBYY FineReader 15.lnk""):b.TargetPath=""%~dp0FineReader.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
CLS &ECHO.&ECHO 完成!&PAUSE >NUL 2>NUL & EXIT