Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Add .PL extension to PATHEXT automatically

by Anonymous Monk
on Dec 30, 2011 at 23:39 UTC ( [id://945700]=note: print w/replies, xml ) Need Help??


in reply to Add .PL extension to PATHEXT automatically

This is what I see in Installer.bat,

if (Win32::IsWinNT() && Win32::IsAdminUser()) { # XXX This could be done on Win9X by direct registry hacking print "\n"; $create_file_association = yes("Create Perl file extension associa +tion?", 1); print "\n"; $create_perl_mapping = yes("Create IIS script mapping for Perl?", +1); print "\n"; $create_isapi_mapping = yes("Create IIS script mapping for Perl IS +API?", 1); }

Then later      create_file_association() if $create_file_association;

sub create_file_association { # Don't leave a space between 'Perl' and '>nul'. # See http://bugs.activestate.com/show_bug.cgi?id=68656 system("assoc .pl=Perl>nul") == 0 or warn "Could not create .pl file type association\n"; system(qq(ftype Perl="$perl" "%1" %* >nul)) == 0 or warn "Could not define command to run .pl files\n"; }

Replies are listed 'Best First'.
Re^2: Add .PL extension to PATHEXT automatically
by adefaria (Beadle) on May 23, 2015 at 00:36 UTC
    Or just use setx.

      *sourcecode*

      Or just use setx.

      assoc/ftype is standard, setx isn't

      Also "just use setx" isn't source code that adds .pl to pathest, like the above

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://945700]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-23 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found