Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Determine default application

Reply
 
Old 08-06-2008   #1 (permalink)
David Trimboli


 
 

Determine default application

I'm looking for a way to determine remotely whether a given computer has
Adobe Acrobat or Adobe Reader as its default PDF viewer. (My
organization is controlling concurrent Acrobat usage with a key server,
and I want to track down who's using Acrobat instead of Reader as their
default viewer.) I can handle scripting in either VBScript or
PowerShell. Does anybody have any hints?

--
David
Stardate 8598.4

My System SpecsSystem Spec
Old 08-06-2008   #2 (permalink)
mayayana


 
 

Re: Determine default application

>
Quote:

> I think this is the key you'd need to look at:
> HKCR:\acrobat\shell\open\command
>
That may tell you whether Adobe is (or once was)
installed. Though I don't have any "acrobat" key on
my system. But for finding the default program you
need to check HKCR\.pdf
The default value there is a class name that has a key
in HKCR. For instance, I have:

FoxitReader.Document

So a PDF on my system is a FoxitReader.Document.
I then look under:

HKCR\FoxitReader.Document\shell\open\command\

to get the executable path of the default program.
If I later allow Acrobat to be the default program
then it will overwrite the HKCR\.pdf default value
"AcroExch.Document" or some such. That won't affect
the FoxitReader.Document key. It will only affect
which key Explorer is led to when a .pdf is double-clicked.






My System SpecsSystem Spec
Old 08-06-2008   #3 (permalink)
David Trimboli


 
 

Re: Determine default application

mayayana wrote:
Quote:

> But for finding the default program you need to check HKCR\.pdf The
> default value there is a class name that has a key in HKCR. For
> instance, I have:
>
> FoxitReader.Document
>
> So a PDF on my system is a FoxitReader.Document. I then look under:
>
> HKCR\FoxitReader.Document\shell\open\command\
>
> to get the executable path of the default program.
Thanks, mayayana. That's exactly what I was looking for. I don't care
what happens if the default handler is something other than an Adobe
program; all I want to find are those computers running Acrobat
Professional as the default, so I can change it (to anything else).

In the short term, I'll probably use psexec.exe to run reg.exe on the
remote system so I can look at the key under HKCR. It's not a script,
but it gets the job done.

--
David
Stardate 8598.8
My System SpecsSystem Spec
Old 08-06-2008   #4 (permalink)
Stefan Kanthak


 
 

Re: Determine default application

"David Trimboli" <trimboli@xxxxxx> wrote:
Quote:

> I'm looking for a way to determine remotely whether a given computer has
> Adobe Acrobat or Adobe Reader as its default PDF viewer. (My
> organization is controlling concurrent Acrobat usage with a key server,
> and I want to track down who's using Acrobat instead of Reader as their
> default viewer.) I can handle scripting in either VBScript or
> PowerShell. Does anybody have any hints?
%comspec% /K assoc /?
%comspec% /K ftype /?

Let them run on the clients via a scheduled task or logon script.

Stefan

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Vista Icons for Default Application on File Types Vista General
Determine default application PowerShell
Need help restoring Default Application Prop. Vista file management
Cannot Set Default Application for .FLA file. I have Adobe Flash C Vista file management
RC2 won't accept Thunderbird to be default mail application. Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46