summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc/w32unclient
blob: e297a13674b83ca0854e0969e983d26d0a87861c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env perl

# see comments in w32client

# Public domain.

BEGIN {
  $^W = 1;
  require "tlmgr.pl";
}

#$::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();

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);

# 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;
}