summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc/w32unclient
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2009-08-13 21:27:39 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2009-08-13 21:27:39 +0000
commitce3bf31aff96e7bfafa8eef9e747523661e68543 (patch)
tree54c360856aa57bf52d8bd7c44f29aff6d3564954 /Master/tlpkg/doc/w32unclient
parent3961588d4c3528bec9859b8800bea77552bb6011 (diff)
Updated client script; uninstaller added
git-svn-id: svn://tug.org/texlive/trunk@14653 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/doc/w32unclient')
-rw-r--r--Master/tlpkg/doc/w32unclient53
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/tlpkg/doc/w32unclient b/Master/tlpkg/doc/w32unclient
new file mode 100644
index 00000000000..d43fc3d12a8
--- /dev/null
+++ b/Master/tlpkg/doc/w32unclient
@@ -0,0 +1,53 @@
+#!/usr/bin/env perl
+
+# see comments in w32client
+
+# Public domain.
+
+BEGIN {
+ $^W = 1;
+ require "tlmgr.pl";
+
+ Win32::TieRegistry->import( qw( $Registry
+ REG_SZ REG_EXPAND_SZ KEY_READ KEY_WRITE KEY_ALL_ACCESS
+ KEY_ENUMERATE_SUB_KEYS ) );
+ $Registry->Delimiter('/');
+ $Registry->ArrayValues(0);
+ $Registry->FixSzNulls(1);
+ Win32::Shortcut->import( qw( SW_SHOWNORMAL SW_SHOWMINNOACTIVE ) );
+}
+
+$::opt_verbosity = 2;
+
+init_local_db();
+
+# Only make user-level changes even if admin
+$opts{'w32mode'} = 'user';
+
+# remove shortcuts
+unshift @ARGV, 'remove', 'shortcut', 'dviout.win32', 'texworks',
+ 'texlive-en', 'tlpsv.win32';
+action_postaction();
+
+# File associations
+unshift @ARGV, 'remove', 'fileassoc', 'dviout.win32', 'tlpsv.win32';
+action_postaction();
+TeXLive::TLWinGoo::update_assocs(); # optional
+
+# xetex font cache
+unshift @ARGV, 'remove', 'script', 'xetex';
+action_postaction();
+
+# Remove TeX Live from path
+unshift @ARGV, 'remove';
+action_path();
+
+# unregister uninstaller
+my $rootkey = $Registry -> Open("CUser",
+ {Access => Win32::TieRegistry::KEY_ALL_ACCESS()});
+die "Failed to open rootkey\n" unless $rootkey;
+if ($rootkey) { # otherwise fail silently
+ my $k = $rootkey->Open(
+ "software/microsoft/windows/currentversion/uninstall/");
+ TeXLive::TLWinGoo::reg_delete_recurse($k, 'OurTexLive/') if $k;
+}