Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

determine installed firefox versions via vbs?

393 views
Skip to first unread message

DaleB

unread,
May 18, 2009, 3:41:53 AM5/18/09
to
Hi all,

i am looking for a way to determine the firefox-version on windows xp
clients via a vbs login script.

I used to read this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla
\Mozilla Firefox\CurrentVersion
This worked fine until we gave our users the right to update
firefox without admin-rights.
Now the the actual current version (after an update with user rights)
is written to under HKEY_Current_User.

Of course i could query the whole registry for the highest firefox
version number but i am sure there are easier and smarter
solutions.... any suggestions?

Greetings,
Andreas

Pegasus [MVP]

unread,
May 18, 2009, 5:01:49 AM5/18/09
to

"DaleB" <andreas...@gmail.com> wrote in message
news:f83e9d35-d523-4c25...@z7g2000vbh.googlegroups.com...

I think a Firefox newsgroup could point you in the right direction, or
perhaps the Firefox FAQs.


mayayana

unread,
May 18, 2009, 9:31:55 AM5/18/09
to
Normally you could check the file from the
path found in:

HKLM\Software\Windows\CurrentVersion\App Paths\Firefox.exe

but there are two glitches in this case.

1) If I remember correctly, FF2+ is no longer a
registered executable. What might work is to check
the Uninstall key. I've got FF 1.5 installed and it
shows under the subkey "Mozilla Firefox (1.5)".
That key has several values that will allow you to
get the parent folder/file path. From there you can
check the file version of firefox.exe.


2) Not so fast. :) This exposes a second way that the
Mozilla people seem to be unorthodox in the way that
they do things (in addition to not registering the EXE):
In my case, with FF1.5, I see 1.8.x as the file version.
So clearly they're using the gecko version as the FF file
version! I see 1.5 as the Product Version.

You might be able to get product version info.
through WMI. I don't remember offhand. If not, see
here for a small class that can be pasted into a
script. It will return any/all file version information
by parsing the file's PE structure directly and retrieving
the resource table:

www.jsware.net/jsware/scripts.php5#fvinfo

Hackoo

unread,
Jan 29, 2014, 6:54:49 AM1/29/14
to
Try this Vbscript:
'******************************************************************************
Option Explicit
Const ForReading = 1
Dim fso,f,WS,ProgramFiles,FichierINI,ReadTextFileTest,Pos,Entree,MajorVersion
Set WS = CreateObject("WScript.shell")
ProgramFiles = WS.ExpandEnvironmentStrings("%programfiles%")
FichierINI = ProgramFiles & "\Mozilla Firefox\application.ini"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(FichierINI,ForReading)
on error resume next
Do While f.AtEndOfStream <> True
ReadTextFileTest = f.ReadLine
Pos = instr(ReadTextFileTest, "=")
Entree = Mid(ReadTextFileTest,1,Pos - 1)
if Entree = "MaxVersion" then
MajorVersion = Mid(ReadTextFileTest, Pos+1)
MajorVersion = Left(MajorVersion, Len(MajorVersion))
Exit do
end if
loop
on error goto 0
f.Close
Set f = Nothing
MsgBox "La version actuelle de votre Firefox est V " & MajorVersion,64,"Version de Firefox " & MajorVersion
'******************************************************************************
0 new messages