Page 2 of 2

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 17:34 UTC
by Horst.Epp
As JOUBE said "A completely pointless discussion"
The definitions and usage are clear and there is no room for other interpretions.

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 18:48 UTC
by white
Hacker wrote: 2022-07-01, 15:38 UTC
*.lnk files, like *.pif *.cmd *.bat *.exe and *.com files don't have any program associated with it. They are executed themselves.
Why would you think that? There is no set of instructions in a .lnk file. You can check the format specification yourself.
Well that's the term used in the operating system isn't it? The file is executed. As mentioned above, nowadays you can even execute documents.

But my suggestion wasn't because I directly think of .lnk files when I hear the term programs. It's because I think .lnk files are very similar to .pif files. That's why I wrote:
white wrote: 2022-06-30, 23:12 UTC It is weird to have *.pif in this list and not *.lnk

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 19:15 UTC
by white
The PATHEXT variable contains a list of file extensions that Windows considers to be executable files.

On my system it's value is:

Code: Select all

.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Perhaps this list or the environment variable should be used.

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 19:35 UTC
by Hacker
white,
Well that's the term used in the operating system isn't it? The file is executed. As mentioned above, nowadays you can even execute documents.
By that logic all files are executable :?

Roman

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 20:45 UTC
by white
Hacker wrote: 2022-07-01, 19:35 UTC By that logic all files are executable :?
Well it's flexible isn't it. The word can have many meanings. As shown above, Microsoft apparently also has a definition defined by PATHEXT where .MSC files (which are XML files) are executables too.

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 21:19 UTC
by Dalai
2white
Not exactly. The PATHEXT variable tells the system which file extensions to try if a command executable is specified without any extension. That's why you can run something like certmgr instead of certmgr.msc on Windows 7 and newer, but not on WinXP because the PATHEXT variable doesn't contain .MSC on the older Windows versions.

If Ghisler were to include script files in this list (like some of the ones listed in PATHEXT), it gets crowded VERY quickly: VBS, PS1, CMD, BAT, PY, PL, PHP, SH, BASH, AU3, AHK and so on and so forth - I guess you see where I'm going ;).

I don't see JavaScript or MSC files as executable. Because if you count those as executable, HTA files are executable too (HTML+JS). It never ends. LNKs can be seen as either, and to me it doesn't really matter if they're listed among .cmd and .exe or not.

Regards
Dalai

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 21:35 UTC
by Hacker
white,
Well it's flexible isn't it. The word can have many meanings.
So what's the point in suggesting to accept a definition that is unclear and ambiguous?

Roman

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 22:51 UTC
by white
Dalai wrote: 2022-07-01, 21:19 UTC Not exactly. The PATHEXT variable tells the system which file extensions to try if a command executable is specified without any extension.
I know. To me this seemed like a nice definition of what to consider an executable. Powershell documentation describes it this way here:
Other environment variables used by PowerShell wrote:The $env:PATHEXT variable contains a list of file extensions that Windows considers to be executable files.
$env:PATHEXT is similar, but not the same as the PATHEXT environment variable.
And $env:PATHEXT also includes .CPL :P
Dalai wrote: 2022-07-01, 21:19 UTC If Ghisler were to include script files in this list (like some of the ones listed in PATHEXT), it gets crowded VERY quickly: VBS, PS1, CMD, BAT, PY, PL, PHP, SH, BASH, AU3, AHK and so on and so forth - I guess you see where I'm going ;).

I don't see JavaScript or MSC files as executable. Because if you count those as executable, HTA files are executable too (HTML+JS). It never ends.
It does end if you let it be defined by PATHEXT.

Re: Add *.lnk to Show Programs filter

Posted: 2022-07-01, 23:00 UTC
by Dalai
white wrote: 2022-07-01, 22:51 UTCTo me this seemed like a nice definition of what to consider an executable. Powershell documentation describes it this way here:
Other environment variables used by PowerShell wrote:The $env:PATHEXT variable contains a list of file extensions that Windows considers to be executable files.
TXT and DOC files are also executable by that definition when ".TXT;.DOC" is added to this variable (which does work BTW). Doesn't make sense to me.

Regards
Dalai