[tex-live] PS-View as Standard Application for PDF?
Norbert Preining
preining at logic.at
Sun Dec 6 07:53:55 CET 2009
Hi Tomek!
On Sa, 05 Dez 2009, T T wrote:
> > Ah yes, that is a good point. AFAIU (and my knowledge of Windows is
> > quite limited) this is actually the case. If you install as user only
> > HKCU is used. But you are right, we should probably check in the
> > user case also HKLM. I don't know enough whether there is a unified
> > way for checking so that you get the association from whichever place
> > where it is defined, but that would be the best solution.
>
> AFAIK, there isn't such a way. We have to check both hives.
What about that patch:
Index: TLWinGoo.pm
===================================================================
--- TLWinGoo.pm (revision 16311)
+++ TLWinGoo.pm (working copy)
@@ -593,17 +593,24 @@
my $file_type = shift;
debug("Linking $extension to $file_type\n");
my ($classes_key_path, $classes_key, $k);
+ my ($admin_classes_key_path, $admin_classes_key);
$extension = lc($extension);
if ($is_admin) {
$classes_key_path = "LMachine/Software/Classes/";
} else {
$classes_key_path = "CUser/Software/Classes/";
+ $admin_classes_key_path = "LMachine/Software/Classes/";
}
$classes_key = $Registry -> Open($classes_key_path,
{Access => KEY_ALL_ACCESS()});
+ if (!$is_admin) {
+ $admin_classes_key = $Registry -> Open($admin_classes_key_path,
+ {Access => KEY_READ()});
+ }
+
if (!defined($classes_key)) {
tlwarn("Cannot get key to $classes_key\n" .
"Cannot continue setting up associations.\n");
@@ -627,8 +634,19 @@
}
}
} else {
- debug("register_extension: old key $extension not found, recreating it\n");
- $do_create_key = 1;
+ if (!$is_admin) {
+ # if we are not admin, we check whether the key is associated
+ # in the admin keys, and if yes, do NOT associate it again
+ if (defined($admin_classes_key->{$extension})) {
+ debug("register_extension: old key $extension found in admins keys, not changing it\n");
+ } else {
+ $do_create_key = 1;
+ }
+ } else {
+ $do_create_key = 1;
+ }
+ debug("register_extension: old key $extension not found, recreating it\n")
+ if $do_create_key;
}
} elsif ($mode == 2) {
$do_create_key = 1;
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TU Wien, Austria Debian TeX Task Force
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
KIRBY MISPERTON (n.)
One who kindly attempts to wipe an apparent kirby (q.v.) off another's
face with a napkin, and then discovers it to be a wart or other
permanent fixture, is said to have committed a 'kirby misperton'.
--- Douglas Adams, The Meaning of Liff
More information about the tex-live
mailing list