@echo off setlocal rem TeX Live Root; ends with backslash set tlroot=%~dp0 set tldrive=%~d0 %tldrive% cd %tlroot% rem use provided Perl set PERL5LIB=%tlroot%tlpkg\tlperl\lib path %tlroot%tlpkg\tlperl\bin;%path% rem remove TeX directories from searchpath with rem some embedded Perl and a temporary batchfile. rem If it is done in the Perl installer then it may not work right. perl -x "%~dpn0.bat" goto fixpath #! perl my @newpt = (); foreach my $d (split (';', $ENV{'PATH'})) { my $df = $d; $df =~ s/\\/\//g; push @newpt, $d unless (-e ($df."/pdftex.exe")); } $ENV{'PATH'} = join(';',@newpt); my $batfile = $ENV{'TEMP'}."\\setpath.bat"; $batfile =~ s/\\/\//g; open TMPBAT, ">$batfile"; print TMPBAT 'path '.$ENV{'PATH'}."\n"; close TMPBAT; __END__ :fixpath call %TEMP%\setpath.bat echo Path: %path% rem del %TEMP%\setpath.bat perl "%~dpn0" %* pause Done rem endlocal is implicit rem About install-tl.bat.manifest: rem Vista assumes that a file with install in the name is rem an installer and therefore requires administrative privileges. rem The manifest file tells Vista otherwise.