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 which version of MS-Excel is installed

Reply
 
Old 08-04-2008   #1 (permalink)
XP


 
 

Determine which version of MS-Excel is installed

I need a VBScript that would determine which version of MS-Excel is currently
installed. Our users would either have 2003 or 2007. Is there a folder to
check for and is that the way to do it?

Thanks much in advance.

My System SpecsSystem Spec
Old 08-04-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: Determine which version of MS-Excel is installed


"XP" <XP@xxxxxx> wrote in message
news:CF58B439-2C80-429B-9161-9BA88B935DB0@xxxxxx
Quote:

>I need a VBScript that would determine which version of MS-Excel is
>currently
> installed. Our users would either have 2003 or 2007. Is there a folder to
> check for and is that the way to do it?
>
> Thanks much in advance.
Excel.exe is usually kept in the Office11 folder. Filever.exe, included
with the Windows Support tools, will tell you the exact version.


My System SpecsSystem Spec
Old 08-04-2008   #3 (permalink)
XP


 
 

Re: Determine which version of MS-Excel is installed

Sorry, forgot to mention the context: this script will be installed and run
locally on each user's machine...

In this case, should I look for presence of Office 12 folder then for
Excel.exe? Would that be considered a reliable test...?


"Pegasus (MVP)" wrote:
Quote:

>
> "XP" <XP@xxxxxx> wrote in message
> news:CF58B439-2C80-429B-9161-9BA88B935DB0@xxxxxx
Quote:

> >I need a VBScript that would determine which version of MS-Excel is
> >currently
> > installed. Our users would either have 2003 or 2007. Is there a folder to
> > check for and is that the way to do it?
> >
> > Thanks much in advance.
>
> Excel.exe is usually kept in the Office11 folder. Filever.exe, included
> with the Windows Support tools, will tell you the exact version.
>
>
>
My System SpecsSystem Spec
Old 08-04-2008   #4 (permalink)
Tom Lavedas


 
 

Re: Determine which version of MS-Excel is installed

On Aug 4, 2:17 pm, XP <X...@xxxxxx> wrote:
Quote:

> Sorry, forgot to mention the context: this script will be installed and run
> locally on each user's machine...
>
> In this case, should I look for presence of Office 12 folder then for
> Excel.exe? Would that be considered a reliable test...?
>
> "Pegasus (MVP)" wrote:
>
Quote:

> > "XP" <X...@xxxxxx> wrote in message
> >news:CF58B439-2C80-429B-9161-9BA88B935DB0@xxxxxx
Quote:

> > >I need a VBScript that would determine which version of MS-Excel is
> > >currently
> > > installed. Our users would either have 2003 or 2007. Is there a folder to
> > > check for and is that the way to do it?
>
Quote:
Quote:

> > > Thanks much in advance.
>
Quote:

> > Excel.exe is usually kept in the Office11 folder. Filever.exe, included
> > with the Windows Support tools, will tell you the exact version.
Maybe a direct query to Excel is a better choice ...

wsh.echo "Excel Version:", CreateObject("Excel.Application").Version

2003 Version = 11.0
2007 Version = 12.0 (I presume from your comments)

Once you have that, the name of the folder can be constructed (Office
& Split(sVersion, ".")(0)), if the file build version is needed, as
well.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
My System SpecsSystem Spec
Old 08-04-2008   #5 (permalink)
Pegasus \(MVP\)


 
 

Re: Determine which version of MS-Excel is installed


"XP" <XP@xxxxxx> wrote in message
news:43B7C577-82A0-4679-8566-4C3EDB632B26@xxxxxx
Quote:

> Sorry, forgot to mention the context: this script will be installed and
> run
> locally on each user's machine...
>
> In this case, should I look for presence of Office 12 folder then for
> Excel.exe? Would that be considered a reliable test...?
Since Excel is not always located in the Offfice11 folder (note:
I wrote "Office11", you wrote "Office 12" - big difference!), you
should search all subfolders under the "Microsoft Office" folder.
You could do it like so:
@echo off
set Office=%ProgramFiles%\Microsoft Office
for /f "delims=" %%a in ('dir /s /b "%Office%\excel.exe"') do (
c:\tools\filever.exe "%%a"
)
pause


My System SpecsSystem Spec
Old 08-04-2008   #6 (permalink)
XP


 
 

Re: Determine which version of MS-Excel is installed


Nice, thanks!


"Tom Lavedas" wrote:
Quote:

> On Aug 4, 2:17 pm, XP <X...@xxxxxx> wrote:
Quote:

> > Sorry, forgot to mention the context: this script will be installed and run
> > locally on each user's machine...
> >
> > In this case, should I look for presence of Office 12 folder then for
> > Excel.exe? Would that be considered a reliable test...?
> >
> > "Pegasus (MVP)" wrote:
> >
Quote:

> > > "XP" <X...@xxxxxx> wrote in message
> > >news:CF58B439-2C80-429B-9161-9BA88B935DB0@xxxxxx
> > > >I need a VBScript that would determine which version of MS-Excel is
> > > >currently
> > > > installed. Our users would either have 2003 or 2007. Is there a folder to
> > > > check for and is that the way to do it?
> >
Quote:

> > > > Thanks much in advance.
> >
Quote:

> > > Excel.exe is usually kept in the Office11 folder. Filever.exe, included
> > > with the Windows Support tools, will tell you the exact version.
>
> Maybe a direct query to Excel is a better choice ...
>
> wsh.echo "Excel Version:", CreateObject("Excel.Application").Version
>
> 2003 Version = 11.0
> 2007 Version = 12.0 (I presume from your comments)
>
> Once you have that, the name of the folder can be constructed (Office
> & Split(sVersion, ".")(0)), if the file build version is needed, as
> well.
>
> Tom Lavedas
> ===========
> http://members.cox.net/tglbatch/wsh/
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: determine installed firefox versions via vbs? VB Script
Determine File Version of a dll PowerShell
Excel Automation - Determine the Columns Selected .NET General
how can i determine the excel rows that contain data PowerShell
Determine installed SQL Version and Edition VB Script


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