PFA validity check

Features wanted...
Post Reply
Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

PFA validity check

Post by Garonne »

Hey Don, can you add a validity check option to portable file associations?

In case of a full path: check for existance
In case of a Windows Name: check if the name is registered and associated with a callable app

In case the file doesn't exist or no registered app (i.e. no icon can be found) the current PFA entry is ignored (or temporarily disabled)

For backwards-compatibility this might be combined with some kind of option that needs to be set for the test to occur.

This would allow for setups like:

zip>Winzip
zip>"portable zip alternative"

to use Winzip (if installed) and a portable alternative (if no Winzip installed)

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: PFA validity check

Post by highend »

You could start a script instead that does such checks?
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: PFA validity check

Post by jupe »

You may have to use full paths, but there is this:

PFAListOnlyExisting=1

follow these instructions exactly on how to tweak: https://www.xyplorer.com/faq-topic.php?id=tweak

Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Re: PFA validity check

Post by Garonne »

highend wrote: 31 Mar 2022 21:28 You could start a script instead that does such checks?
Sadly I'm not that good at scripting.
jupe wrote: 31 Mar 2022 21:47 You may have to use full paths, but there is this:

PFAListOnlyExisting=1

follow these instructions exactly on how to tweak: https://www.xyplorer.com/faq-topic.php?id=tweak
Well, at least for full paths this does the trick, thanks. Didn't know that thing existed...

There probably isn't any guide about the tweaks existing, is there?

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: PFA validity check

Post by highend »

E.g.:

Code: Select all

    $installed = "C:\Program Files\WinZip\winzip64.exe";
    $portable  = "D:\Tools\WinZip\winzip64.exe";

    $regcmd = get("regcmd", "zip"); // open="C:\Program Files\WinZip\winzip64.exe" "%1"
    if     (exists($installed) == 1) { $path = $installed; }
    elseif ($regcmd)                 { $path = regexmatches($regcmd, "[a-z]:\\[^""]+"); }
    elseif (exists($portable) == 1)  { $path = $portable;  }

    if ($path) { run lax("$path" "<pfaitem>"); }
One of my scripts helped you out? Please donate via Paypal

Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Re: PFA validity check

Post by Garonne »

highend wrote: 01 Apr 2022 15:03 E.g.:

Code: Select all

    $installed = "C:\Program Files\WinZip\winzip64.exe";
    $portable  = "D:\Tools\WinZip\winzip64.exe";

    $regcmd = get("regcmd", "zip"); // open="C:\Program Files\WinZip\winzip64.exe" "%1"
    if     (exists($installed) == 1) { $path = $installed; }
    elseif ($regcmd)                 { $path = regexmatches($regcmd, "[a-z]:\\[^""]+"); }
    elseif (exists($portable) == 1)  { $path = $portable;  }

    if ($path) { run lax("$path" "<pfaitem>"); }
Thanks. But I guess, the tweak (PFAListOnlyExisting) does work for me... at least for installed and portable tools.

Post Reply