TC + %PROCESSOR_ARCHITECTURE% + Win9X

Bug reports will be moved here when the described bug has been fixed

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MaxX
Power Member
Power Member
Posts: 671
Joined: 2012-03-23, 18:15 UTC
Location: Earth

TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *MaxX » 2019-11-19, 08:45 UTC

Confirmed for 9.22a and actual 9.5 betas. Older versions may be affected too, did not test them.

Win9X: TC does not support %PROCESSOR_ARCHITECTURE% variable for programs' paths in wincmd.ini.
Error: Path not found.

WinXP/7/10: TC supports %PROCESSOR_ARCHITECTURE% variable for programs' paths in wincmd.ini,
but does not support %PROCESSOR_ARCHITECTURE:~3,2% there.

Bug or feature?
Could you fix that?

User avatar
petermad
Power Member
Power Member
Posts: 8967
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *petermad » 2019-11-19, 11:01 UTC

Win 9x does only come in 32bit https://en.wikipedia.org/wiki/Timeline_of_Microsoft_Windows - so I guess %PROCESSOR_ARCHITECTURE% is not supported by Windows. Have you checked with the DOS SET command, that there is a %PROCESSOR_ARCHITECTURE% in yor win9x environment?


but does not support %PROCESSOR_ARCHITECTURE:~3,2% there.
This is a known limitation:
viewtopic.php?f=3&t=45194&p=314727&hilit=%25PROCESSOR_ARCHITECTURE%3A~#p314727
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

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

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *ghisler(Author) » 2019-11-19, 15:22 UTC

Win9X: TC does not support %PROCESSOR_ARCHITECTURE% variable for programs' paths in wincmd.ini.
%PROCESSOR_ARCHITECTURE% is an environment variable defined by Windows, NOT by Total Commander. It's not defined on all Windows versions.
Author of Total Commander
http://www.ghisler.com

User avatar
MaxX
Power Member
Power Member
Posts: 671
Joined: 2012-03-23, 18:15 UTC
Location: Earth

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *MaxX » 2019-11-24, 21:25 UTC

I understand.
What about %PROCESSOR_ARCHITECTURE:~3,2% for XP and newer?

User avatar
Dalai
Power Member
Power Member
Posts: 6778
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *Dalai » 2019-11-24, 21:29 UTC

2MaxX
What about it? A syntax like this is specific to CMD, and TC doesn't support it, and IIRC Ghisler said somewhere that it won't support it in the future.

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

Plugins: Services2, Startups

User avatar
petermad
Power Member
Power Member
Posts: 8967
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *petermad » 2019-11-24, 23:18 UTC

2Dalai
IIRC Ghisler said somewhere that it won't support it in the future.
Actually he said he would put it on his to-do list: viewtopic.php?p=320433#p320433

Also several workarounds in that thread.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

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

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *ghisler(Author) » 2019-11-25, 11:32 UTC

What about %PROCESSOR_ARCHITECTURE:~3,2% for XP and newer?
I will add it to the next beta, thanks for reminding me.
Author of Total Commander
http://www.ghisler.com

User avatar
petermad
Power Member
Power Member
Posts: 8967
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *petermad » 2019-11-27, 23:58 UTC

history.txt:
25.11.19 Added: Support substrings from environment variables, e.g. %variable:~2,3% skips 2 characters and then keeps 3. Negative variables are counted from the back of the string (32/64)
I can confirm that a parameter like %PROCESSOR_ARCHITECTURE:~3,2% now works in the command field for buttons, and em_commands in TC 9.5b7 :-)
License #524 (1994)
Danish Total Commander Translator
TC 9.5b8 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.935 (x64)
TC 3.0b12 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
MaxX
Power Member
Power Member
Posts: 671
Joined: 2012-03-23, 18:15 UTC
Location: Earth

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *MaxX » 2019-11-28, 08:40 UTC

Editor=%COMMANDER_PATH%\Plugins\exe\AkelPad%PROCESSOR_ARCHITECTURE:~3,2%.exe
Looks like it works on Win 7 SP1 x32. Later I want to test on x64.
Such a good feature. I'm glad.

 
ghisler(Author) wrote:
2019-11-19, 15:22 UTC
%PROCESSOR_ARCHITECTURE% is an environment variable defined by Windows, NOT by Total Commander. It's not defined on all Windows versions.
Could you add some config parameter to skip %PROCESSOR_ARCHITECTURE% and(or) %PROCESSOR_ARCHITECTURE:~3,2% in wincmd.ini on Win9X? Just via something like "SkipProcArch=1" or similar.
I mean that %COMMANDER_PATH%\Plugins\exe\AkelPad%PROCESSOR_ARCHITECTURE:~3,2%.exe becomes "C:\Totalcmd\Plugins\exe\AkelPad.exe" for Win9X, not the "C:\Totalcmd\Plugins\exe\AkelPad%PROCESSOR_ARCHITECTURE:~3,2%.exe". That allows us to have only Akelpad.exe and Akelpad64.exe and one config line for all OS.
That would be great.

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

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *ghisler(Author) » 2019-11-28, 11:27 UTC

Why not just set PROCESSOR_ARCHITECTURE yourself as a custom environment variable in Windows 9x?
Author of Total Commander
http://www.ghisler.com

User avatar
MaxX
Power Member
Power Member
Posts: 671
Joined: 2012-03-23, 18:15 UTC
Location: Earth

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *MaxX » 2019-11-28, 12:14 UTC

Hm.. Did not think this way.
Thanks.

User avatar
MaxX
Power Member
Power Member
Posts: 671
Joined: 2012-03-23, 18:15 UTC
Location: Earth

Re: TC + %PROCESSOR_ARCHITECTURE% + Win9X

Post by *MaxX » 2019-11-28, 20:16 UTC

MaxX wrote:
2019-11-28, 08:40 UTC
Later I want to test on x64.
Checked, x64 works fine.

Post Reply