diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-02-26 22:41:18 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2008-02-26 22:41:18 +0000 |
commit | 3b8e15525b4f13d58666c9f711401dabb1bbe7f0 (patch) | |
tree | 90002aeb33ff9b92a0bb34c38a6a44d3c7367fdb /Master/tlpkg/TeXLive | |
parent | 994ed09222390f3206082e8f80b4a2c7d1ebd8c2 (diff) |
Uninstaller for win32: simply remove all (pdf)tex directories from the path.
git-svn-id: svn://tug.org/texlive/trunk@6756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 8a083cd7b6e..3f6cd3be3d4 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -60,7 +60,7 @@ BEGIN { &get_system_path &get_user_path &add_texbindir_to_path - &remove_texbindir_from_path + &remove_texbindirs_from_path ®ister_script_type &unregister_script_type &broadcast_env @@ -216,9 +216,9 @@ sub dir_writable { my $written = 0; $written = (print TEST "\n"); close TEST; - # is it possible that writing fails silently? - # anyhow, the test below won't hurt. - return 0 unless -e $f; + # -s: non-zero size + # -e (exists) is not good enough + return 0 unless -s $f; unlink $f; return $written; } @@ -433,9 +433,8 @@ sub add_texbindir_to_path { } } -sub remove_texbindir_from_path { +sub remove_texbindirs_from_path { $wg_error = 0; # clear error status - $texbindir = shift; my $system_env = get_system_env(); my $user_env = get_user_env(); @@ -451,7 +450,7 @@ sub remove_texbindir_from_path { $d_exp = expand_string($d); $d_exp =~ s/\\/\//g; $d_exp =~ s/\/$//; - push @newp, $d unless (uc($d_exp) eq uc($texbindir)); + push @newp, $d unless is_a_texdir($d_exp); } $newp = join (';', @newp); $newp =~ s/\//\\/g; @@ -465,7 +464,7 @@ sub remove_texbindir_from_path { $d_exp = expand_string($d); $d_exp =~ s/\\/\//g; $d_exp =~ s/\/$//; - push @newp, $d unless (uc($d_exp) eq uc($texbindir)); + push @newp, $d unless is_a_texdir($d_exp); } if (@newp) { $newp = join(';', @newp); @@ -695,6 +694,8 @@ sub update_assocs() { } else { tllog ($::LOG_DDEBUG, "No update_fu\n"); } + system( "RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True" ) + unless admin(); } =pod |