Old 8th June 2007, 10:13   #1
lakaz
Junior Member
 
Join Date: Jun 2007
Posts: 3
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
lakaz is offline   Reply With Quote
Old 8th June 2007, 11:31   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
Have you tried to find it in registry?

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

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 8th June 2007, 12:27   #3
lakaz
Junior Member
 
Join Date: Jun 2007
Posts: 3
Quote:
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
lakaz is offline   Reply With Quote
Old 8th June 2007, 12:34   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
code:
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox" "CurrentVersion"
ReadRegStr $1 HKLM "Software\Mozilla\Mozilla Firefox\$1\Main" "PathToExe"


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th June 2007, 12:37   #5
lakaz
Junior Member
 
Join Date: Jun 2007
Posts: 3
Quote:
Originally posted by kichik
code:
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
lakaz is offline   Reply With Quote
Old 8th June 2007, 15:15   #6
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
Quote:
Originally posted by kichik
code:
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

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump