ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Odd PDF problem   [Help!]

By: Zdenek Hladik       
Date: May 08,2023 at 10:33
In Response to: [Help!] Odd PDF problem (Alan Clark)

Hi everyone,

starting elevated Acrobat reader and even with security settings decreased is not a very good idea. As Alan, I often start Ztree in privileged mode. It is litle dangerous,but the risks multiply if you start a buggy program such as Acrobat Reader. AR is very often the target of exploitation of its bugs. Infected PDF documents as mail attachment are not rare!

BTW, in fact, elevated Acrobat reader starts, but hangs in the background! And then it also blocks all your next tries to start it unelevated! You must kill ALL hung instances to recover (or simply reboot PC).

I solved this dilemma by the indirect start of the AR program via PDF.BAT in Ztree home dir. I use this trick also for other programs such as VSCODE editor etc. I strongly recommend to you solve unelevation of Open command if you run Ztree Elevated.

Uneleavation is a little tricky: You will pass the program to Windows Explorer (not IE), but you must do it indirectly because Explorer ignores parameters:

PDF.BAT:

if exist "%programfiles(x86)%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" set PDFRdr=%programfiles(x86)%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe
if exist "%programfiles%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" set PDFRdr=%programfiles%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe
if exist "%programW6432%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" set PDFRdr=%programW6432%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe
if exist "%programfiles%\Adobe\Acrobat DC\Acrobat\Acrobat.exe" set PDFRdr=%programfiles%\Adobe\Acrobat DC\Acrobat\Acrobat.exe
if exist "%programW6432%\Adobe\Acrobat DC\Acrobat\Acrobat.exe" set PDFRdr=%programW6432%\Adobe\Acrobat DC\Acrobat\Acrobat.exe

if "%PDFRdr%x"==x goto notfound
set DOC=%1

set XBAT=%TEMP%\PDFRUN_%RANDOM%_%RANDOM%.BAT
echo start "pdfrun" "%PDFRdr%" %DOC% >"%XBAT%"

:: this trick does not work well
:: start "pdfrun" /MIN runas.exe /trustlevel:0x20000 "%TEMP%\PDFRUN.BAT"

::this one is OK but does not handle parameters
start "pdfrun" /MIN %SYSTEMROOT%\explorer "%XBAT%"

:notfound


I hope this PDF.BAT helps little to other Ztree fans.

Zdenek


> > > Hi everyone
> > >
> > > I manage a lot of PDF files and I'm accustomed to viewing them by
> > > simply pressing 'O' for open in Ztree. Recently, I've found this
> > > doesn't work any longer.
> >
> > Hi Alan,
> >
> > Have you recently started running ZTree as Administrator?
> >
> > If so, you need to change one of Acrobat's security settings.
> >
> > In Preferences, Security (Enhanced), uncheck "Enable Protected Mode
> at
> > startup."
> >
> > - John
>
> Hi John.
>
> Yes, I have recently started running Ztree in Administrator mode, for
> various reasons. I did as you suggested and now everything is working
> fine. Many thanks for your help.
>
> Alan

329 views      
 

Messages in this Thread

 
96,656 Postings in 12,233 Threads, 350 registered users, 59 users online (0 registered, 59 guests)
Index | Admin contact |   Forum Time: May 13, 2024 - 6:06 pm UTC  |  Hits:63,434,272  (15,422 Today )
RSS Feed