How to open PDF files in Foxit Reader without exclusively blocking the files

I use Foxit Reader as my default PDF viewer for quite some time now. The only thing that bugged me, however, was its exclusive access to the opened PDF files. When working with LaTeX and using Foxit Reader for displaying the compiled PDF files, I had to close the PDF file manually everytime I wanted to recompile the document (which can be quite often).

Today, I found the solution to this problem: Foxit Reader is able to open PDF files without blocking them. With a simple command line argument you can enable this non-blocking mode:

/A nolock=1

For example, if you wanted to open D:\mydocument.pdf, you would call Foxit Reader like this:

FoxitReader.exe D:\mydocument.pdf /A nolock=1

Attention: For this to work, you need at least version 7 of Foxit Reader.

However, calling Foxit Reader manually like this can be pretty cumbersome. So I decided to make the non-blocking opening the system default. This turns out to be pretty easy. Just fire up regedit.exe and add the above command line argument to the key HKEY_CLASSES_ROOT\FoxitReader.Document\shell\open\command. Here’s a complete REG file for this (you may need to change the path to Foxit Reader):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\FoxitReader.Document\shell\open\command]
@="\"C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\FoxitReader.exe\" \"%1\" /A nolock=1"

Now I’m able to open PDF files directly from Explorer, PowerShell etc. without Foxit Reader blocking them. And Foxit Reader even automatically updates the file, if I change it while it’s open.

Über Stefan

Polyglot Clean Code Developer

3 Kommentare

  1. I had the same problem of using Latex while viewing the document in foxit reader. Your solution works like a charm, thank you for sharing

  2. Thanks! That helped a lot.

  3. Thank you man, this trick really help me.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax