Page 1 of 1
PFA validity check
Posted: 31 Mar 2022 21:20
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)
Re: PFA validity check
Posted: 31 Mar 2022 21:28
by highend
You could start a script instead that does such checks?
Re: PFA validity check
Posted: 31 Mar 2022 21:47
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
Re: PFA validity check
Posted: 01 Apr 2022 13:45
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.
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?
Re: PFA validity check
Posted: 01 Apr 2022 15:03
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>"); }
Re: PFA validity check
Posted: 01 Apr 2022 19:56
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.