Solved

How to create BAT file to easily switch default program for file type

Posted on 2013-01-28
4
1,821 Views
Last Modified: 2013-02-12
Recent Firefox plugin updates forced us to download Adobe Reader XI to view PDFs in the browser.  This is creating a problem for us on some websites as we also have Adobe Acrobat X installed for all users.  Some websites won't display correctly unless we change the default programs for PDFs back to Reader.  Simply having Reader open doesn't help "trick" it.

What I'm needing help with is either creating a batch file (maybe with ASSOC or FTYPE comands)...or even just exporting & reimporting registry keys to make this easier & quicker for the user to change.

I tried setting the default app to Acrobat, exporting the registry key for HKEY_CLASSES_ROOT\.pdf then changing the default app to Reader & exported the same key...hoping that all we'd have to do is double click one or the other to toggle the default app...but I don't see a difference in the 2 exported keys when viewing them in Notepad & it doesn't appear to be working.

We're currently using Windows 7 Pro.
0
Comment
Question by:blugirl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Expert Comment

by:nickinthooz
ID: 38828408
ASSOC .Tif=DocuImagExp.exe
FTYPE DocuImagExp.exe="%Programfiles%\DocuCabinet\DocuImagExp.exe" "%%1"

Open in new window


of course change this to pdf and whatever program you want to open the pdf's
0
 

Author Comment

by:blugirl
ID: 38828471
Thanks nickinthooz...but I'm not sure if it's working.  I setup the BATs as follows...

ASSOC .PDF=AcroRd32.exe
FTYPE Acrobat.exe="C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" "%%1"

Open in new window


Also...

ASSOC .PDF=Acrobat.exe
FTYPE Acrobat.exe="C:\Program Files (x86)\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe" "%%1"

Open in new window


When I run ASSOC .PDF in the command prompt, it shows .pdf=AcroRd32.exe &  .pdf=Acrobat.exe, respectively...and I'm making sure that Reader & Acrobat are closed when running the BATs
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 38831266
ASSOC and FTYPE only have an effect on opening the files in Windows (e.g. by double-clicking the file in explorer). Acrobat and Reader use a different approach to select which one to use to open files in the browser plug-in. What mechanism are you using to display PDFs in FireFox? You mention a plug-in, which one are you using?
0
 

Author Comment

by:blugirl
ID: 38882584
khkremer, thanks for that info.  To view PDFs in FireFox, it forced us to download the "Adobe PDF plugin for FireFox & Netscape".

Since it's only one user that needs to generate the report once a month, I just showed them how to change the default application.

Thanks again for the help though!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HP laptop drivers 12 61
Assignment from incompatible pointer type? 2 40
VMware-ClientIntegrationPlugins 6 82
Delete Temp on all PCs 7 52
In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question