Starting firefox in C:\Program Files instead of...

English support forum

Moderators: Hacker, petermad, Stefan2, white

avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Starting firefox in C:\Program Files instead of...

Post by *avada »

I noticed some strange behaviour today. I wanted to start firefox from command line in TC. It was a ff3.1 beta in a different directory (and drive) than the stable version wich is in "C:\Program Files\Firefox\". But I couldn't do it. TC always started the one in "C:\Program Files\Firefox\". Why could this be?
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Avada.

Which folder was your current working folder inside T.C. when you used the T.C. commandline?

What exactly did you type inside the T.C. commandline?

What happens if you
+ open cmd.exe
+ "cd" to the same folder
+ type exactly the same command?

Karl
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

karlchen wrote:Hello, Avada.

Which folder was your current working folder inside T.C. when you used the T.C. commandline?

What exactly did you type inside the T.C. commandline?

What happens if you
+ open cmd.exe
+ "cd" to the same folder
+ type exactly the same command?

Karl
The workin folder was wich ff3.1 was in of course.

The command was "firefox.exe -p --no-remote" when I first noticed it. Of course it happens if I simply type "firefox.exe"

If I use the same command in cmd ff3.1 starts, as it should in TC.

TC:
Image: http://www.imageocean.net/images/89g62tal1etifgda1ei2.png

CMD:
Image: http://www.imageocean.net/images/wqmi6l9sk6v3n3lrvop.png
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, Avada.

Sorry to say, yet, the answers which you give do not answer any of the questions which I asked too clearly. :(

The two Process Explorer screenshots do not really show what has been done in order to launch the two processes beyond doubt.
Yet, the screenshot labelled "TC" shows that the commandline which was launched read
"C:\Program files\Firefox\Firefox.exe" -p --no-remote
This strongly suggests that you yourself have typed exactly this commandline inside the T.C. commandline box.

There is no hint that T.C. has not done exactly what it has been instructed to do. So by the looks of your screenshots, you were in the right folder inside T.C., but you typed the wrong commandline.

Cheers,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50861
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I have no idea either what is going on inside of Windows here. Maybe you can start the one in the current directory with
.\firefox.exe
instead of just
firefox.exe
Author of Total Commander
https://www.ghisler.com
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

I have noticed that firefox.exe can be launch from everywhere(in the file system :)) although "%programfiles%\Mozilla Firefox\" isn't in the %Path%. This happens (I suppose) if firefox is one of the "Default Programs".
User avatar
HolgerK
Power Member
Power Member
Posts: 5411
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

dott wrote:This happens (I suppose) if firefox is one of the "Default Programs"
This is caused by a registry key:
http://weblogs.asp.net/whaggard/archive/2004/04/11/111232.aspx wrote:... a call to ShellExecute, which I guess is not too surprising. The next thing I wanted to find out was exactly how the commands are resolved. The following is an ordered list of how they are resolved ([1]):

* The current working directory
* The Windows directory (no subdirectories are searched)
* The Windows\System32 directory
* Directories listed in the PATH environment variable
* The App Paths registry key
...

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe]
@="C:\\Program Files\\Mozilla Firefox\\firefox.exe"
"Path"="C:\\Program Files\\Mozilla Firefox"
Regards,
Holger
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Please also note that if you changed into the Firefox 3.1 dir by pressing Tab (switching from the other panel) instead of by navigating into it then the current directory remains to be set to the one of the other panel.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 16113
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Please also note that if you changed into the Firefox 3.1 dir by pressing Tab (switching from the other panel) instead of by navigating into it then the current directory remains to be set to the one of the other panel.
:?: :?: :?: :?: :?:
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

petermad wrote::?: :?: :?: :?: :?:
Pressing Tab does not change the working dir.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

2HolgerK
Thanks for the clarification.
2Hacker
Here, press tab change the working dir.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

dott,
Hm, try this experiment:
Left: c:\Left
Right: c:\Right <- active panel

Inside the right panel, enter Subdir:
Left: c:\Left
Right: c:\Right\Subdir <- active panel

Press Tab:
Left: c:\Left <- active panel
Right: c:\Right\Subdir

Now go to Configuration - Options - Plugins - File system plugins - Configure - Add.
Here the dialog opens with C:\Right\Subdir instead of c:\Left.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

karlchen wrote:Hi, Avada.

Sorry to say, yet, the answers which you give do not answer any of the questions which I asked too clearly. :(

The two Process Explorer screenshots do not really show what has been done in order to launch the two processes beyond doubt.
Yet, the screenshot labelled "TC" shows that the commandline which was launched read
"C:\Program files\Firefox\Firefox.exe" -p --no-remote
This strongly suggests that you yourself have typed exactly this commandline inside the T.C. commandline box.

There is no hint that T.C. has not done exactly what it has been instructed to do. So by the looks of your screenshots, you were in the right folder inside T.C., but you typed the wrong commandline.

Cheers,
Karl
I did what I said I did.
ghisler(Author) wrote:Sorry, I have no idea either what is going on inside of Windows here. Maybe you can start the one in the current directory with
.\firefox.exe
instead of just
firefox.exe
It starts the on in the current directory. But I have to say it's weird an confusing that tc starts something else than it shows.
HolgerK wrote: This is caused by a registry key:
http://weblogs.asp.net/whaggard/archive/2004/04/11/111232.aspx wrote:... a call to ShellExecute, which I guess is not too surprising. The next thing I wanted to find out was exactly how the commands are resolved. The following is an ordered list of how they are resolved ([1]):

* The current working directory
* The Windows directory (no subdirectories are searched)
* The Windows\System32 directory
* Directories listed in the PATH environment variable
* The App Paths registry key
...

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe]
@="C:\\Program Files\\Mozilla Firefox\\firefox.exe"
"Path"="C:\\Program Files\\Mozilla Firefox"
Regards,
Holger
I think you're right. When I changed the name of the key "firefox.exe" TC started the one in the current directory. Also I could start all the programs that appeared in "App Paths".

Also I noticed that XP's run dialog behaves the same way. But I think it would be better if TC behaved like CMD and wouldn't check the keys in "App Paths".
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi.
HolgerK wrote:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe]
@="C:\\Program Files\\Mozilla Firefox\\firefox.exe"
"Path"="C:\\Program Files\\Mozilla Firefox"
This is mean, though a documented thing. :shock:
Has not occurred to me because there are only different portable Firefox version here. Hence the "Firefox.exe" string value does not exist here inside "App Paths" and does not cause any confusion.
avada wrote:it would be better if TC behaved like CMD and wouldn't check the keys in "App Paths".
This is debatable: a lot of users complain, because T.C. does not behave like Explorer in all aspects. Implementing your request would certainly provoke complaints/requests like: Why can I invoke Firefox by simply typing "firefox.exe" inside Explorer, but not in T.C.? T.C. should respect the value of the "App Paths" regkey.

Well, at least, two things have been cleared up:
+ You did not commit a mistake.
+ T.C. did not commit a mistake.

And you know how to avoid the issue now. :)

Kind regards,
Karl
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

karlchen wrote:This is debatable: a lot of users complain, because T.C. does not behave like Explorer in all aspects. Implementing your request would certainly provoke complaints/requests like: Why can I invoke Firefox by simply typing "firefox.exe" inside Explorer, but not in T.C.? T.C. should respect the value of the "App Paths" regkey.

Well, at least, two things have been cleared up:
+ You did not commit a mistake.
+ T.C. did not commit a mistake.

And you know how to avoid the issue now. :)

Kind regards,
Karl
I think that TC doesn't behave like explorer is good thing. Using explorer is inefficient and annoying at times. And using a button for firefox is more conveniet than typing a command. Also, with explorer it doesn't work. Only with the run dialog.
Post Reply