如何通过自动程序使 Adobe Reader 成为 Windows 10 上 PDF 文件的默认所有者?
由于 HCU 中的哈希值,它不能简单地通过更改注册表来更改。
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts.pdf\UserChoice] “哈希”=“k56kO7cBd6o=” “ProgId”=“AcroRd32.pdf”
答案1
制作文件 pdf_default.bat 这会使一些注册表更改,从而使 AcroRd32.exe 位于默认程序和调用 .vbs 文件之间。
===pdf_default.bat===
@echo off
cls
echo --==**## Adobe Reader between default programs ##**==--
reg add "HKEY_CURRENT_USER\SOFTWARE\Adobe\CommonFiles\Usage\Reader 10" /v OptIn /t REG_DWORD /d 0 /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\AcroRd32.exe\shell\open\command /ve /d "\"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe\" \"%%1\"" /f >nul
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AcroRd32.pdf\shell\open\command /ve /d "\"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe\" \"%%1\"" /f >nul
reg add HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications /v "AcroRd32" /d "Software\AcroRd32\Capabilities" /f >nul
reg add HKEY_LOCAL_MACHINE\SOFTWARE\AcroRd32\Capabilities /v "ApplicationDescription" /d "AcroRd32 is default program for PDF files." /f >nul
reg add HKEY_LOCAL_MACHINE\SOFTWARE\AcroRd32\Capabilities /v "ApplicationName" /d "AcroRd32" /f >nul
reg add HKEY_LOCAL_MACHINE\SOFTWARE\AcroRd32\Capabilities\FileAssociations /v ".pdf" /d "AcroRd32.pdf" /f >nul
cscript //NoLogo conf\IEdefault_PDFdefault.vbs
timeout /t 1 /nobreak > NUL
现在,您可以通过 GUI 使用 AcroRd32.exe 打开 PDF。因此,我们可以成功破解注册表中的 WIN10 Hash 问题 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts.pdf\UserChoice] "Hash"="k56kO7cBd6o=" "ProgId"="AcroRd32.pdf"
===PDFdefault.vbs===
Set WshShell = WScript.CreateObject("WScript.Shell")
' Open window to set Adobe Reader default program for PDF.
WshShell.Run "%windir%\system32\control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram\pageAdvancedSettings?pszAppName=AcroRd32"
WScript.Sleep 500
WshShell.SendKeys "{TAB}"
WshShell.SendKeys " "
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WScript.Sleep 500
WshShell.SendKeys " "
Msgbox "Default program for PDF is AdobeReader."
WScript.Quit