Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Disabling PerlScript isn't as easy as it should be... until now.

<html><head><title>PerlScript deactivator</title></head><body> <p>You probably don't have PerlScript installed.</p><p> <script language="PerlScript"> use strict; BEGIN { $^W= 1; } use vars qw( $window ); sub Output { $window->document->write( join "", @_ ); } my $Reg; use Win32::TieRegistry( TiedRef=>\$Reg, Delimiter=>"/", ArrayValues=>1, ":REG_" ); my $key= $Reg->{"LMachine/Software/ActiveState/"}; if( ! $key ) { Output "You don't have ActiveState software installed?? ($^E)"; } else { for my $prod ( $key->SubKeyNames() ) { Output "Found ActiveState/$prod/...<br>\n"; my $regProd= $key->{"$prod/"}; if( ! $regProd ) { Output "<p>Can't open ActiveState/$prod/: $^E</p>"; next; } for my $ver ( $regProd->SubKeyNames() ) { Output( ("&nbsp"x4)."Found version $ver...<br>\n" ); my $regVer= $regProd->{"$ver/"}; if( ! $regVer ) { Output "<p>Can't open ". "ActiveState/$prod/$ver/: $^E</p>"; next; } my $zones= $regVer->{"/EnabledZones"}; if( ! $zones ) { Output( ("&nbsp"x8)."Can't open ". ".../$ver//EnabledZones: $^E<br>" ); next; } Output( ("&nbsp"x8). "Enabled for zones: $zones->[0]<br>\n" ); if( $regVer->{"/EnabledZones"}= [ "0x0000", REG_DWORD ] ) { Output( ("&nbsp"x8)."Now disabled!<br>\n" ); } else { Output "<p>Can't disable ". "ActiveState/$prod/$ver: $^E</p>"; } } } } </script> <p>Done checking.</p> <!-- Typical output: You probably don't have PerlScript installed. Found ActiveState/ActivePerl/... Found version 616... Can't open .../616//EnabledZones: The system cannot find the f +ile specified Found ActiveState/PerlScript/... Found version 1.0... Enabled for zones: 0x00000000 Now disabled! Done checking. --> </body></html>

Simply hit the "d/l code" link below, save that to a file called something like "PerlScript.htm", verify your browser didn't mess it up too much, then view the saved file in IE and you should get an indication that PerlScript has been disabled. You can verify that it worked by reloading the page and seeing that only the first and last lines of text appear.

        - tye (but my friends call me "Tye")

In reply to (tye)Re: use PerlScript && die; by tye
in thread use PerlScript && die; by $code or die

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2022-08-10 05:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found