Open only checks exists when PFA fails.

Features wanted...
admin
Site Admin
Posts: 67135
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open only checks exists when PFA fails.

Post by admin »

I think I can do that. Check next beta...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Open only checks exists when PFA fails.

Post by TheQwerty »

admin wrote:I think I can do that. Check next beta...
Don, I don't see any change in behavior on this in 15.00.0122?
Did you already revert it or did it not happen?

admin
Site Admin
Posts: 67135
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open only checks exists when PFA fails.

Post by admin »

It happened. :?

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Open only checks exists when PFA fails.

Post by TheQwerty »

screenshot.56.png
Given the above in 15.00.0122 and notepad.exe does not exist in either of those locations.

Opening 127.0.0.1.lnk opens WE to \\127.0.0.1
Opening A.txt.lnk shows txt: C:\Zen\LNK-Test\A.txt (Correct!)
Opening all other *.lnk results in Not Found: Link Target Could not find: <targetPath>

Which implies that the target existence check is still being done before any PFA matching.
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67135
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open only checks exists when PFA fails.

Post by admin »

Yep, there was indeed another place that needed to be changed. Coming with next beta...

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Open only checks exists when PFA fails.

Post by TheQwerty »

That's much better Don - thank you!

However... :biggrin:
There's still some aspects I don't understand. :?

Given these PFAs:

Code: Select all

+txt>::Echo "txt: <pfaitem>";
+exe>::Echo "exe: <pfaitem>";
+lnk>::Echo "lnk: <pfaitem>";
+*>::Echo "all: <pfaitem>";
Take a look at this image:
screenshot.59.png
The selected items (1, 9, 10) are ones that make me go hmmm..
  1. :bug: Shortcuts to servers open in WE. (Item 1) (Perhaps caused by XY property vs Shell property?)
  2. :tup: Shortcuts to existing remote paths open in XY. (Item 2)
  3. :tup: Shortcuts to existing text files use the txt PFA (Items 5, 11). Makes sense but then why do...
  4. :?: Shortcuts to existing exes use lnk PFA instead of the exe PFA? (Items 9, 10)
  5. :tup: Shortcuts to non-existing targets use the lnk PFA. (Items 3-4, 6-8, 12)
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67135
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open only checks exists when PFA fails.

Post by admin »

Interesting stuff! :tup:

1) Double :bug: -- should be fixed next time.

4) Tricky. What you see is a side effect of the fix to this: http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=11905
I currently don't see a way to fix both at the same time.
The old fix: XY cannot itself handle the elevation (Run as administrator) in the LNK properties -- it cannot even know about this (at least I don't know the way). Therefore I pass a LNK to an EXE to the shell and let the shell do its thing.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Open only checks exists when PFA fails.

Post by TheQwerty »

admin wrote:Interesting stuff! :tup:

1) Double :bug: -- should be fixed next time.

4) Tricky. What you see is a side effect of the fix to this: http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=11905
I currently don't see a way to fix both at the same time.
The old fix: XY cannot itself handle the elevation (Run as administrator) in the LNK properties -- it cannot even know about this (at least I don't know the way). Therefore I pass a LNK to an EXE to the shell and let the shell do its thing.
1) Fixed.
4) Ah.. complicated.

Based on Microsoft's documentation for the lnk format. A valid lnk file starts with a ShellLinkHeader which contains LinkFlags which contains a bit flag RunAsUser. If this is 0 it runs as admin - else the current user.

So you should be able to just check that bit, right? ;)

admin
Site Admin
Posts: 67135
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open only checks exists when PFA fails.

Post by admin »

Yep, interesting bit of knowledge. However, I have to shift this to the lo-prio-heap.

Here's an excuse that you might accept: I'm working on user functions for scripting now. 8)

Filehero
Posts: 2734
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Open only checks exists when PFA fails.

Post by Filehero »

admin wrote:I'm working on user functions for scripting now. 8)
:tup: :tup: :tup: :shock: :shock: :shock: :appl: :appl: :appl:

Wonderful turn.

Some new types as well? :whistle: I think while you're at SC arrays and hashes deserve some contemplation.

Again, great news. :D


Cheers,
Filehero

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Open only checks exists when PFA fails.

Post by PeterH »

That's good news :shock: :D

Post Reply