Here's a pretty simple evaluator column script that shows a 'friendly name' for the most common platforms / architectures for binary files. Most commonly exe and dll, but a few others that also use PE and show the architecture in the 'Description' column.
Basically it just takes the info from the description which includes the architecture as the first part of the string, and parses that.
To use it just open Preferences > Evaluator Columns > Add. Then call it whatever you want, I have it called "Architecture".
If you want to change how it displays certain ones, or add more, it's simple enough to just add or edit the bottom section.
// Only process certain extensions. Otherwise early return/exit
// Use janky list checking strategy via InStr (Result is -1 if not found)
if (!IsSet("desc")) return "";
exts = "-exe-dll-efi-ax-acm-cpl-drv-ocx-";
if (InStr(exts, "-" + ext + "-") == -1) { return "" };
// Remove the user description from the description if available.
exeType = IsSet("userdesc") ? Mid(desc, Len(userdesc) + 3) : desc;
// Find the first comma in the description property, get the text before it
commaPos = InStr(exeType, ",");
if (commapos != -1) exeType = Left(exeType, commaPos);
// You can comment out this section, or certain lines, if you don't care about the friendly names
// Having more shouldn't affect performance much since the most common ones are first and returns once found
// Friendly name examples here: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.portableexecutable.machine?view=net-9.0
if (exeType == "AMD64" ) { return "64 bit (x64)" };
if (exeType == "I386" ) { return "32 bit (x86)" };
if (exeType == "ARM64" ) { return "Arm64" };
if (exeType == "THUMB2" ) { return "ARM Thumb-2" };
if (exeType == "THUMB" ) { return "Thumb" };
// If no matching friendly name just return as is
return exeType;
Changes:
2/12/25 - Include changes by @errante to ensure removal of user description before parsing, as suggested by thread replies
OK, I don't yet fully understand your point, but I trust you that it is correct.
So maybe this could recklessly happen, but who behaves like this ?
I thought this Evaluator Column post reflected fair effort.
I have this @ThioJoe column on my system.
Topics on this category of the forum are screened before posting at my level at least.
Honestly, I liked this Evaluator Column .
If you can fix the problem, Please !
Not neccesarily. You can first remove the user description (if any) from the description.
With just a few changes at the start:
// Only process certain extensions. Otherwise early return/exit
// Use janky list checking strategy via InStr (Result is -1 if not found)
if (!IsSet("desc")) return "";
exts = "-exe-dll-efi-ax-acm-cpl-drv-ocx-";
if (InStr(exts, "-" + ext + "-") == -1) { return "" };
// Remove the user description from the description if available.
exeType = IsSet("userdesc") ? Mid(desc, Len(userdesc) + 3) : desc;
// Find the first comma in the description property, get the text before it
commaPos = InStr(exeType, ",");
if (commapos != -1) exeType = Left(exeType, commaPos);
// You can comment out this section, or certain lines, if you don't care about the friendly names
// Having more shouldn't affect performance much since the most common ones are first and returns once found
// Friendly name examples here: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.portableexecutable.machine?view=net-9.0
if (exeType == "AMD64" ) { return "64 bit (x64)" };
if (exeType == "I386" ) { return "32 bit (x86)" };
if (exeType == "ARM64" ) { return "Arm64" };
if (exeType == "THUMB2" ) { return "ARM Thumb-2" };
if (exeType == "THUMB" ) { return "Thumb" };
// If no matching friendly name just return as is
return exeType;