Total Commander architecture variable

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Total Commander architecture variable

Post by *LonerD »

It would be useful to have Total Commander architecture predefined variable.
Like %commander_arch% with values 32 or 64 depending running TC bitness.

This possibility presents in Autorun plugin, or we can get bitness in scripts. But I think it's important variable, and TC must have it natively.
Last edited by LonerD on 2016-07-26, 17:37 UTC, edited 3 times in total.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

No need for a TC variable as we already have OS environment
PROCESSOR_ARCHITECTURE=AMD64
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

2Horst.Epp
It's OS architectute.
My suggestion about current running TC process bitness.
Last edited by LonerD on 2016-07-26, 17:31 UTC, edited 1 time in total.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Dalai
Power Member
Power Member
Posts: 10022
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2LonerD
PROCESSOR_ARCHITECTURE will be/contain "x86" in a 32 bit process on Windows x64.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

LonerD wrote:2Horst.Epp
It's OS architectute.
My suggestion about current running TC process bitness (I have fix first post).
For what do I need that info in a script or batch ?
It doesn't matter which TC version started the process
of interest is only the OS type.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

Horst.Epp wrote:For what do I need that info in a script or batch ?
No ideas for what you need that info.
TC has many-many options, that not used by ALL users.

But for example - I need this info for work with TC control's classes (windows, buttons, checkboxes... etc) in scripts. Classes have different names in 32 and 64 bit TC. Also this information uses for run 32x or 64x programs depending TC bitness.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
petermad
Power Member
Power Member
Posts: 16116
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2LonerD

Checking PROCESSOR_ARCHITECTURE from within TC or from a DOS console startet from TC will show:
PROCESSOR_ARCHITECTURE=amd64 when running TC x64
and
PROCESSOR_ARCHITECTURE=x86 wen running TC 32bit

Isn't that good enough?

Example:

Code: Select all

TOTALCMD#BAR#DATA
cd %PROCESSOR_ARCHITECTURE%

%COMMANDER_EXE%,6
CD x86 or amd64


-1
Copy this buttton to your button bar. Make a x86 and a amd64 directory - click the button and see what happens depending on which version of TC you are running.
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
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

petermad wrote: Checking PROCESSOR_ARCHITECTURE from within TC or from a DOS console startet from TC
Yes. It works directly from TC.
But not from scripts (AutoIT, AHK) or another programs. For example - %commander_path% and %commander_exe% work from any program that running from TC, and it's very useful.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

LonerD wrote:
petermad wrote: Checking PROCESSOR_ARCHITECTURE from within TC or from a DOS console startet from TC
Yes. It works directly from TC.
But not from scripts (AutoIT, AHK) or another programs. For example - %commander_path% and %commander_exe% work from any program that running from TC, and it's very useful.
Compile your scripts and they have access to all TC variables if startet from TC
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

LonerD,
Can't you set such envvar to %PROCESSOR_ARCHITECTURE% within TC using Autorun plugin?
Post Reply