home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / mac / Software / entwickl / win95 / plisi306.exe / bin / perlis-uninstall.bat < prev    next >
DOS Batch File  |  1997-04-09  |  2KB  |  66 lines

  1. @rem = '--*-Perl-*--';      
  2. @rem = '
  3. @echo off
  4. if exist perl.exe goto perlhere
  5. cd bin
  6. if not exist perl.exe goto perlnotthere
  7. :perlhere
  8. if not exist Perl300.dll goto perlnotthere
  9. if not exist Perlglob.exe goto perlnotthere
  10. if not exist PerlIS.dll goto PerlISnotthere
  11. perl.exe PerlIS-uninstall.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
  12. pause
  13. goto endofperl
  14. @rem ';
  15.  
  16. @INC = qw( ..\Lib ..\Ext );
  17.  
  18. require 'NT.ph';
  19.  
  20. print <<'--end--';
  21. PerlIS-uninstall.bat:
  22.   This script will remove the registry entries created by the 
  23.   PerlIS-install.bat script.  The script does not delete files.
  24.   You can re-install by running PerlIS-install.bat again. 
  25. Continue?(Y/N):
  26. --end--
  27.  
  28. $in = <STDIN>;
  29. until ( $in eq "\n" || $in =~ /^y/i ) {
  30.     exit if ( $in =~ /^no?\n$/i );
  31.     print "Do you wish to proceed? [Y/n]";
  32.     $in = <STDIN>;
  33. }
  34.  
  35. #Check for IIS.
  36. if(!Win32::RegOpenKeyEx(&HKEY_LOCAL_MACHINE,
  37.                 'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script Map',
  38.                 &NULL,&KEY_ALL_ACCESS, $Servkey)) {
  39.     print "No Microsoft Internet Information Server Installed\n";
  40.     exit;
  41. }
  42.  
  43. print "\nWhich extension is associated with PerlIS.dll.";
  44. print "\nExtension:<pl is the default>";
  45.  
  46. $extension = <STDIN>;
  47. chop($extension);
  48. $extension = "pl" if ( $extension eq "" );    
  49. $extension = '.'.$extension unless ($extension =~ /\..*/ );
  50.  
  51. Win32::RegDeleteValue($Servkey, $extension) ?
  52.     print "Deleting $extension value from registry\n" :
  53.     warn "Cannot delete $extension value from registry!!!\n";
  54.  
  55. Win32::RegCloseKey($Servkey);
  56.  
  57. __END__
  58. :perlnotthere
  59. echo Could not find Perl interpreter!!
  60. echo *gasp* *wheez* *choke*
  61. goto endofperl
  62. :PerlISnotthere
  63. echo Did you install PerlIS into the same directory as Perl?
  64. :endofperl
  65.  
  66.