@ECHO OFF & PUSHD "%~dp0" && CD /D "%~dp0"
>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
)
::注册转换文档控件
regsvr32 /s PDFToWordX.dll
::取消自动检测更新
if not exist "%AppData%\PDF Shaper" md "%AppData%\PDF Shaper" 2>NUL
echo.[PDF Shaper]>>"%AppData%\PDF Shaper\pdfshaper.ini"2>NUL
echo.Update=0 >>"%AppData%\PDF Shaper\pdfshaper.ini"2>NUL
ECHO.&ECHO 完成！设置默认PDF阅读器？   www.ddooo.com   
ECHO.&ECHO 是敲任意键，否直接关闭呗！   www.ddooo.com   &PAUSE >NUL 2>NUL
::关联PDF阅读器
reg delete "HKCU\SOFTWARE\Classes\.pdf" /f /ve /d "" >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\PDFShaperPro" /f  >NUL 2>NUL
reg delete "HKCU\SOFTWARE\Classes\Applications\PDFViewer.exe" /f  >NUL 2>NUL
reg add "HKCR\.pdf" /f /ve /d "PDFShaperPro" >NUL 2>NUL
reg add "HKCR\PDFShaperPro" /f /ve /d "PDF Viewer" >NUL 2>NUL
reg add "HKCR\PDFShaperPro\DefaultIcon" /f /ve /d "%~dp0pdffile.ico" >NUL 2>NUL
reg add "HKCR\PDFShaperPro\shell\open\command" /f /ve /d "\"%~dp0PDFViewer.exe\" \"%%1\"" >NUL 2>NUL
del/f/q "%UserProfile%\AppData\Local\IconCache*.db" >nul 2>nul & assoc .=.file >NUL 2>NUL

CLS &ECHO.&ECHO 完成！   www.ddooo.com   &PAUSE >NUL 2>NUL & EXIT