::BatchGotAdmin
:---------------------------------------------------------------------------
REM  --> Check for permissions
>nul 2>&1 cd/d "%homedrive%\Recovery"

REM --> If error flag set, we do not have admin.
if errorlevel 1 (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto GotAdmin )

:UACPrompt
    if '%1'=='UACdone' (shift & goto GotAdmin)
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\GetAdmin.vbs"
    echo UAC.ShellExecute "%~s0", "UACdone", "", "runas", 1 >> "%temp%\GetAdmin.vbs"
    "%temp%\GetAdmin.vbs"
    exit /B

:GotAdmin
    if exist "%temp%\GetAdmin.vbs" ( del "%temp%\GetAdmin.vbs" )
    cd/d %~dp0
:---------------------------------------------------------------------------
@echo on

copy /y %~dp0PDFlibAX64.dll %SystemRoot%\System32
regsvr32 %SystemRoot%\System32\PDFlibAX64.dll
