Page 2 of 2

Re: Open only checks exists when PFA fails.

Posted: 16 Mar 2015 17:43
by admin
I think I can do that. Check next beta...

Re: Open only checks exists when PFA fails.

Posted: 23 Mar 2015 12:35
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?

Re: Open only checks exists when PFA fails.

Posted: 23 Mar 2015 12:40
by admin
It happened. :?

Re: Open only checks exists when PFA fails.

Posted: 23 Mar 2015 12:53
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.

Re: Open only checks exists when PFA fails.

Posted: 24 Mar 2015 15:34
by admin
Yep, there was indeed another place that needed to be changed. Coming with next beta...

Re: Open only checks exists when PFA fails.

Posted: 26 Mar 2015 20:46
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)

Re: Open only checks exists when PFA fails.

Posted: 27 Mar 2015 09:19
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.

Re: Open only checks exists when PFA fails.

Posted: 30 Mar 2015 18:04
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? ;)

Re: Open only checks exists when PFA fails.

Posted: 08 Apr 2015 16:56
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)

Re: Open only checks exists when PFA fails.

Posted: 08 Apr 2015 22:34
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

Re: Open only checks exists when PFA fails.

Posted: 08 Apr 2015 22:47
by PeterH
That's good news :shock: :D