Different behavior of %ProgramFiles% in TC 7.56a and 8.0 ß9

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
MarianD
Junior Member
Junior Member
Posts: 52
Joined: 2009-05-27, 21:33 UTC
Location: Bratislava, Slovakia

Different behavior of %ProgramFiles% in TC 7.56a and 8.0 ß9

Post by *MarianD »

Environmental variable "ProgramFiles" in the user item in the Start menu behaves differently in TC 7.56a and TC 8.0 ß9 (64-bit) in 64-bit Windows.

Excerpt from wincmd.ini:

Code: Select all

[user]
menu1=Program Files (x86)
cmd1=cd %ProgramFiles%
In the TC 7.56a using this command changes the directory to "C:\Program Files (x86)" in accordance with the (default) setting of the environmental variable ProgramFiles in the 64-bit Windows 7.

In the TC 8.0 ß9 the same command changes the directory to "C:\Program Files".
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, MarianD.

Total Commander 7.56a is a 32-bit application. On Windows 64-bit, %programfiles% for a 32-bit application gets resolved as "C:\Program Files (x86)".
Total Commander 8.0ß9 64-bit is a 64-bit application. On Windows 64-bit, %programfiles% for a 64-bit application gets resolved as "C:\Program Files". (On 32-bit Windows, Total Commander 8.0ß9 64-bit cannot be executed a all.)
Total Commander 8.0ß9 32-bit is a 32-bit application. Therefore, on Windows 64-bit, it will resolve %programfiles% as "C:\Program Files (x86)", just like Total Commander 7.56a does.

So no bug involved. Everything works as designed by Microsoft (Windows) and by Christian Ghisler (Total Commander).

Kind regards,
Karl
User avatar
Flint
Power Member
Power Member
Posts: 3511
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

MarianD
It does not behave differently, it does exactly what it should do: goes to the location stored in the variable %ProgramFiles%. It's Windows that puts different values into this variable for 32- and 64-bit applications. If you try 32-bit version of TC8 you will see that it jumps into Program Files (x86), just like TC 7.56a.

<Added>
Typing too slow. Oh well… :)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

32-bit:

Code: Select all

ProgramFiles=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
64-bit:

Code: Select all

ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
So if you really need to always go to Program Files with or without (x86), no matter if you use 32-bit or 64-bit TC, there's a way.
MarianD
Junior Member
Junior Member
Posts: 52
Joined: 2009-05-27, 21:33 UTC
Location: Bratislava, Slovakia

Post by *MarianD »

karichen & Flint & Sob

Thank you for your explaining, I apologize.

MarianD
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the English forum.

Hacker (Moderator)[/mod]
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.
Post Reply