diff options
-rw-r--r-- | Master/texmf/scripts/texlive/uninstall-win32.pl | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Master/texmf/scripts/texlive/uninstall-win32.pl b/Master/texmf/scripts/texlive/uninstall-win32.pl index 6bc34ba67e3..f7a6da352b8 100644 --- a/Master/texmf/scripts/texlive/uninstall-win32.pl +++ b/Master/texmf/scripts/texlive/uninstall-win32.pl @@ -73,7 +73,7 @@ sub doit { # from_dvd case: # unsetenv_reg("TEXMFSYSVAR"); unsetenv_reg("TEXMFCNF"); - unregister_uninstaller(); + unregister_uninstaller($localtlpdb->option("w32_multi_user")); exit if is_vista(); broadcast_env(); update_assocs(); diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 9df4804690d..a0b5122548f 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -140,6 +140,7 @@ BEGIN { } } +use TeXLive::TLConfig; use TeXLive::TLUtils; TeXLive::TLUtils->import( qw( mkdirhier ) ); @@ -1045,21 +1046,23 @@ sub create_uninstaller { my $uninst_key = $Registry -> Open((admin() ? "LMachine" : "CUser") . "/software/microsoft/windows/currentversion/", {Access => KEY_ALL_ACCESS()}); - my $k = $uninst_key->CreateKey("uninstall/TeXLive/"); - $k->{"/DisplayName"} = "TeXLive ".$::texlive_release; + my $k = $uninst_key->CreateKey( + "uninstall/TeXLive$::TeXLive::TLConfig::ReleaseYear/"); + $k->{"/DisplayName"} = "TeX Live $::TeXLive::TLConfig::ReleaseYear"; $k->{"/UninstallString"} = "\"$tdw\\tlpkg\\installer\\uninst.bat\""; - $k->{'/DisplayVersion'} = $::texlive_release; + $k->{'/DisplayVersion'} = $::TeXLive::TLConfig::ReleaseYear; $k->{'/URLInfoAbout'} = "http://www.tug.org/texlive"; mkdirhier("$tdwfw/tlpkg/installer"); # wasn't this done yet? if (open UNINST, ">$tdwfw/tlpkg/installer/uninst.bat") { print UNINST <<UNEND; \@echo off +setlocal rem This should not be necessary, but sometimes it is: path $td\\tlpkg\\tlperl\\bin;$td\\bin\\win32;%path% set PERL5LIB=$td\\tlpkg\\tlperl\\lib perl.exe \"$td\\texmf\\scripts\\texlive\\uninstall-win32.pl\" -if errorlevel 1 exit +if errorlevel 1 goto :eof copy \"$tdw\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\" rem pause \"\%TEMP\%\\uninst2.bat\" @@ -1122,16 +1125,13 @@ Removes TeXLive from Add/Remove Programs. =cut sub unregister_uninstaller { - my $regkey_uninst; - $regkey_uninst = $Registry->Open( - "CUser/software/microsoft/windows/currentversion/uninstall/", + my ($w32_multi_user) = @_; + my $regkey_uninst_path = ($w32_multi_user ? "LMachine" : "CUser") . + "/software/microsoft/windows/currentversion/uninstall/"; + my $regkey_uninst = $Registry->Open($regkey_uninst_path, {Access => KEY_ALL_ACCESS()}); - reg_delete_recurse($regkey_uninst, 'texlive/') if $regkey_uninst; - return unless admin(); - $regkey_uninst = $Registry->Open( - "LMachine/software/microsoft/windows/currentversion/uninstall/", - {Access => KEY_ALL_ACCESS()}); - reg_delete_recurse($regkey_uninst, 'texlive/') if $regkey_uninst; + reg_delete_recurse($regkey_uninst, "TeXLive$::TeXLive::TLConfig::ReleaseYear/") + if $regkey_uninst; } =pod |