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