home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 1997
/
CT_SW_97.ISO
/
pc
/
software
/
entwickl
/
win95
/
plisi306.exe
/
bin
/
perlis-install.bat
next >
Wrap
DOS Batch File
|
1996-12-12
|
2KB
|
101 lines
@rem = '--*-Perl-*--';
@rem = '
@echo off
if exist perl.exe goto perlhere
cd bin
if not exist perl.exe goto perlnotthere
:perlhere
if not exist Perl300.dll goto perlnotthere
if not exist Perlglob.exe goto perlnotthere
if not exist PerlIS.dll goto PerlISnotthere
echo Installing PerlIS
pause
perl.exe PerlIS-install.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 1 goto perlerror
goto endofperl
@rem ';
BEGIN{
@INC = qw( ..\Lib ..\Ext );
};
# xxx get rid of this dpreciated syntax !!!!
#(c) 1996 Microsoft Corporation. All rights reserved.
# Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
require 'NT.ph';
require 'ctime.pl';
$date = ctime( time );
sub MyLog ($) {
( $message ) = @_;
print LOG $message;
print $message;
}
sub gripe ($) {
( $message ) = @_;
print LOG $message;
warn $message;
}
open ( LOG, '>>install.log' ) || warn "Couldn't open log file!\n";
MyLog( '***** '.$date );
chop( $perldir = `cd` );
MyLog( "Installing PerlIS into $perldir" );
#Check for IIS.
if(!Win32::RegOpenKeyEx (&HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script Map',
&NULL,&KEY_ALL_ACCESS,$Servkey)) {
gripe "No Microsoft Internet Information Server Installed\n";
exit;
}
#Ask for the extension to associate with perlIS.dll.
print "\nPlease choose a file extension to associate with PerlIS.dll.";
print "\nExtension:<pl is the default>";
$extension = <STDIN>;
chop($extension);
$extension = "pl" if ( $extension eq "" );
$extension = '.'.$extension unless ($extension =~ /\..*/ );
#make association.
Win32::RegSetValueEx( $Servkey,"$extension", &NULL, ®_SZ, "$perldir\\PerlIS.dll" ) ?
MyLog( "-->Association made with $extension\n" ) :
gripe( "**Association of $extension to $perldir\\PerlIS.dll failed!!\n" );
Win32::RegCloseKey( $Servkey );
print "\nopening release.txt...\n";
__END__
:perlerror
echo UH-OH... something bad happened
goto done
:perlnotthere
echo Could not find Perl interpreter!!
echo *gasp* *wheez* *choke*
echo Did you install PerlIS into the same directory
echo as Perl for Win32???
echo You need to install Perl for Win32 before PerlIS
goto endofperl
:PerlISnotthere
echo Did you install PerlIS into the same directory as Perl?
:endofperl
notepad ..\docs\PerlIS\release.txt
:done
pause