Set PDF-XChange Viewer as default PDF viewer

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Hello everyone,

I spent this whole day, trying to set the PDF-XChange Viewer to default for all users on a terminal server.
There are currently the Acrobat Reader DC and PDF-XChange Viewer installed on the machine. The Acrobat Reader is just needed for one pice of software, which requires the Acrobat Reader. But I want that the users can view the PDF files with the PDF-XChange Viewer. (Cause there is a bug when you try to export/print a PDF file on the terminal server with the Acrobat Reader.)

So I tryed to modify EVERY registry key in this basekey for every user:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\

Or running commands like these: (Which only works as administrator - but not for all users on the terminal server)
"C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" /makeassoc

I even tryed to set the default PDF viewer through the windows policy. I succeded to REset the PDF viewer, but wasn't able to SET the default PDF viewer to the PDF-XChange Viewer.

Everything without success. :c

Is there any way I can set the default PDF viewer for the user?
Any ideas are welcome!

Please help me asap, my customers would like to print some PDF files on monday!
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Is there nobody who can help me?
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Willy Van Nuffel »

Hello,

I have no experience with terminal server, but can you tell us how your users are supposed to open PDF-files?

Is it just by double click on such a files, or is there an application from within it should be possible to open PDFs?

You probably also know that PDF-XChange Viewer has become obsolete, and has been replaced by PDF-XChange Editor?
https://www.pdf-xchange.com/produc ... nge-editor
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Yeah, just with a double click.
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Willy Van Nuffel »

1) Like you mentioned earlier, the following registry settings should be sufficient:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf]
"Progid"="PDF-XChangeViewer.1"
"Application"="PDFXCview.exe"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice]
"Hash"="GF1rZhqcYGY="
"ProgId"="PDF-XChangeViewer.1"

2) If you set PDF-XChange Viewer manually as default PDF-viewer for a particular user, does that work?
- right mouse click on a PDF in Windows File Explorer > Open With > Choose another app
- select PDF-XChange Viewer, check "Always use ..." and click OK.
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Modifing the registry keys does not work.
Yes, currently I'm only able to set the default through this context menu.
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

I'm also unable to set the PDF-XChange Editor through registry keys! So this is no alternative.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Tracker Supp-Stefan »

Hello Daniel,

Then what is the current default PDF viewing application?
Has e.g. Edge stolen the file associations and not giving them back?
How to Stop Edge From Hijacking Your PDF or HTML Associations?

Cheers,
Stefan
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Hello,

thanks for the reply!

Currently the Acrobat Reader is set as default.
But we are still unable to set the PDF X-Change Viewer automatically as default.
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Willy Van Nuffel »

I do not know if it might help and if you are willing to do this, but you can search through Windows Registry for the Adobe Reader executable (AcroRd32.exe for example).

At every place or key where you think it might make a difference, you could compare that key with the same key on a computer where you have manually set PDF-XChange Viewer as the default viewer and where that works.

In that way (and with a little bit of chance) you will probably find the determinating value(s) ...
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi Daniel,

I am sorry to hear you are seeing these issues. Have you seen this from this page for the Editor: https://help.pdf-xchange.com/pdfxe6 ... ns_ed.html

Code: Select all

/fileassoc
This command determines the file associations for PDF-XChange Editor.

Syntax
/fileassoc[:user=no|yes]

Parameters
•user=no - then file associations will be placed in HKEY_ LOCAL_MACHINE.
•user=yes - then file associations will be placed in HKEY_CURRENT_USER and HKEY_ LOCAL_MACHINE.

Example
PDFXEdit.exe /fileassoc:user=yes
and

Code: Select all

/webassoc
This command determines the mime type (web browser) associations for PDF-XChange Editor.

Syntax
/webassoc[:user=no|yes] 

Parameters
•user=no - then mime type associations will be placed in HKEY_ LOCAL_MACHINE.
•user=yes - then mime type associations will be placed in HKEY_CURRENT_USER and HKEY_ LOCAL_MACHINE. 

Example
PDFXEdit.exe /webassoc:user=yes
Since you want it for all users you should be able to do :

Code: Select all

change user /install
PDFXEdit.exe /fileassoc:user=no
change user /execute
It should launch the editor silently and set the associations in HKLM. With it set in HKLM and nothing in your users' HKCU they should get the association. If they have their own in HKCU it will take precedence and you would want to run the same from within their user session to ensure it gets to the right place in the registry. A logon runoce is one approach to doing this without user interaction.

Let me know if that helps.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Hello,

thanks for your suggestion, but the command I should try just resets the default pdf viewer application. So when I run the command and open a pdf file, I need to select a pdf viewer in the explorer...

Am I doing something wrong?
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi Daniel,

maybe I am misunderstanding something. Those commands will set the Editor as default for opening PDF files.
/fileassoc sets it for local files so you do not need to choose it in Explorer, it should have the association, use our icons and launch in our product.
/webassoc sets the mime types so that IE will open PDF files in our Editor Add-In, again as default and without users being asked what to do with the file.

Which did you use? Did you see something different?

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

I used:
/fileassoc
both, for the xchange viewer and editor.
But none of them got set correctly.
In both cases the default viewer just got "resettet", so I had to choose the pdf viewer when I open a pdf file (after I executed the command).

What I have to do to set the pdf viewer correctly?
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi Daniel,

what version Terminal Server are you running? The following should work, however I just tested it on my W2K8 R2 Terminal Server and it did not set the associations.

Being a Terminal Server you should be doing the recommended thing and ensuring:
  • there are no users logged onto the Terminal Server
  • You are not using an RDP session (Use the server terminal)
  • As administrator before running /fileassoc issue the command
    change user install
  • run the command
    C:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe /fileassoc:user=no
  • run the command
    change user /execute
These days change user /install is not always required when installing an application as the Windows Installer Service takes care of enabling 'Install Mode', however it is not in this case installing and you should to run the commands.

We will be investigating this further, meanwhile, can you tell me what version Windows Server you are running this on please?

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi again Daniel,

I ran the tests again and realized that this will not work if your user has explicitly set an association for the PDF files. The reason is that the logic used is to look to the user's HKCU hive to see if the association is set, if it is then nothing is changed. If there is not association set by the user then the Editor will look to HKLM for guidance and use the association set there.

The upshot if this is that new users, or users who have not changed their file associations should see the Editor as default after running /fileassoc:user=no, anyone else will not see a change. I should have realized this as I was testing.

The only way to set these associations for these users is to run the same command from within their user session as themselves. A login script is easiest, have them run
"C:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe" /fileassoc:user=yes
and since you are running it as the logged on user it will apply it to their profile.

I just retested in the R2K8-R2 test server I'm running and id does behave this way.

I hope that heklps, my apologies for missing that vital piece.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Hello,

thank you very very much for your help!

I'm using Windows Server 2012 R2 Datacenter.
So I simply have to run the following commands, when a user loggs in, to set the XChange Editor as default for new and existing users (even with a configured default pdf viewer)?
PDFXEdit.exe /fileassoc:user=no
and then
PDFXEdit.exe /fileassoc:user=yes

And is there any way to do this for the XChange Viewer? Cause some of my customers would like to have this application as default pdf viewer.
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi Daniel,

you would only need to run
PDFXEdit.exe /fileassoc:user=no
once but with Administrative rights - that will put the HKLM entry in place for new and unconfigured users.

Run
PDFXEdit.exe /fileassoc:user=yes
once as the user on login to set them explicitly in HKCU.

Whether you do the per user for all your users or not is up to you, it may be easier than trying to determine who is already configured and who is not. Don't miss the former as it sets things up for new users down the road so they should not need to set it themselves (unless another association is set of course.)

Regards the Viewer, we did have something similar though I have not tested this in anything for years...

Code: Select all

makes full association:
PDFXCview.exe /makeassoc:web=true // makes associations for both web and PDF files

for removing association:
PDFXCview.exe /makeassoc:web=false // disables plugins and makes association for PDF-files
PDFXCview.exe /makeassoc:web=false&webonly=yes // disables plugins only, association for PDF-files not be changed
I hope that helps.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Daniel.Developer
User
Posts: 10
Joined: Fri Oct 27, 2017 8:54 pm

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Daniel.Developer »

Hello,

thanks for your reply!

The commands for the PDF X-Change Viewer aren't working :(

Am I missing something?
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6835
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Set PDF-XChange Viewer as default PDF viewer

Post by Paul - Tracker Supp »

Hi Daniel,

when you run the command for the Viewer are you doing it as a logged in user in a session or as admin for all users? If the latter, are you following the Microsoft guidelines for a Terminal Server and doing it from a Terminal (not an RDP session), with your users logged out and between commands

Code: Select all

change user \install
run command 
change user \execute
What is the desired outcome? All users get the same associations or let it be a per user choice?

I can set up a test on a Server 2012 R2 but is will take a while.

Meanwhile, can you please export a couple of reg keys for me to see please?

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Tracker Software\PDFViewer\FileAssociations
HKEY_CURRENT_USER\Software\Tracker Software\PDFViewer
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply