Jump to content
Sign in to follow this  
Shiro

Get FireFox version

Recommended Posts

Shiro

hi

can anyone tell how to get Firefox version?


Share this post


Link to post
Share on other sites
PsaltyDS

Sounded handy so I tried this:

$sFF_Key = "HKCU\Software\Classes\FirefoxHTML\shell\open\command"
$sFF_OpenCmd = RegRead($sFF_Key, "") ; Default
ConsoleWrite("$sFF_OpenCmd = " & $sFF_OpenCmd & @LF)
If StringLeft($sFF_OpenCmd, 1) = '"' Then
    $sFF_OpenCmd = StringMid($sFF_OpenCmd, 2, StringInStr($sFF_OpenCmd, '"', 0, 2) - 2)
    ConsoleWrite("$sFF_OpenCmd = " & $sFF_OpenCmd & @LF)
    $sFF_Ver = FileGetVersion($sFF_OpenCmd, "ProductVersion")
    ConsoleWrite("$sFF_Ver = " & $sFF_Ver & @LF)
EndIf

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Shiro

$ffv = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox", "CurrentVersion"
MsgBox(64, "Firefox Version", $ffv, 10)

is it not ok?


Share this post


Link to post
Share on other sites
PsaltyDS

Absolutely. That is certainly more direct and efficient.

I only looked for a key that would give the file path if it was installed to a non-default location.

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Shiro

Thanx


Share this post


Link to post
Share on other sites
ripdad

MsgBox(0,'',FileGetVersion(@ProgramFilesDir & '\Mozilla Firefox\firefox.exe', 'ProductVersion'))


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites
PsaltyDS

MsgBox(0,'',FileGetVersion(@ProgramFilesDir & '\Mozilla Firefox\firefox.exe', 'ProductVersion'))
Assumes it was installed to the default location. This is exactly the error I was trying to avoid. In the process, I didn't catch the much more direct answer Shiro arrived at.

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
ripdad

PsaltyDS,

yes true

I think Shiro is missing something in code though

take care


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites
PsaltyDS

I think Shiro is missing something in code though

Yeah, closing paren; but we'll call that a typo 'gimme and not discuss it so as not to draw attention...

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×