Archive: NSIS script : how to find firefox path ?


NSIS script : how to find firefox path ?
hi,

i try to find firefox.exe in my install script but anytime this fails, i have tried :

GetFullPathName $1 firefox.exe
SearchPath $1 firefox.exe

both return me an empty string
any clue plz ?

thx


Have you tried to find it in registry?

e.g. look under the key HKLM "SOFTWARE\Mozilla\Mozilla Firefox"


Originally posted by Red Wine
Have you tried to find it in registry?

e.g. look under the key HKLM "SOFTWARE\Mozilla\Mozilla Firefox"
i have just tried the following code but no result :

ReadRegStr $1 HKLM "SOFTWARE\Mozilla\" "Mozilla Firefox"
MessageBox MB_OK "<$1>"

$1 is empty

edit : lol sorry was not checking the right key
thx for help

ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox" "CurrentVersion"
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox\$1\Main" "PathToExe"

Originally posted by kichik
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox" "CurrentVersion"
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox\$1\Main" "PathToExe"
yup ty :)
very nicely reactive community here btw ;)

Originally posted by kichik
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox" "CurrentVersion"
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox\$1\Main" "PathToExe"
That is the best solution for common user (only one Firefox) to get the actual version.

Use HKCU for current user but this might old and not actual.

Mozilla used that entry some time ago.

For other browsers you can search like this:
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox 1.5
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox 2.0.0.x *
(* replace in a loop to find it)
Some experienced users dont use the installer but the nightly zip which dont use the key from kichik.

Same with Seamonkey or Suite.

HTH