summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLWinGoo.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLWinGoo.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm26
1 files changed, 13 insertions, 13 deletions
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