Sponsoring website: Emergency Boot Kit


perl icons for use with Windows™ 95/98/NT
and

How to associate .pl files with perl.exe


If you're running an Active State Perl install or your .pl files are already associated with perl.exe, then jump to these instructions instead !

Associating .pl files with the perl executable (and an icon)

Are you tired of having to open a DOS-window, type "perl" at the prompt, and then type your .pl script name just to run a perl program (or utility) you frequently use?

Just click on it in the Windows File Explorer!

How To Do It:

IF your .pl files aren't associated with the perl.exe program already [NOTE--if you have some weird .pl files that are NOT perl scripts on your Windows computer, I will NOT be responsible for any problems you may have by carrying out the following steps!!], then you can do so by following these instructions:

  1. Open the File Explorer.
  2. Click on the "View" menu and choose the "Options" item.
  3. Click on the "File Types" TAB at the top.
  4. Press the "New Type" button near the top.

  5. In the "Add New File Type" dialog, enter a short phrase such as "perl script" or "perl program" (without the quote marks) into the "Description of type" box.
  6. In "Associated extension," type:   pl   (without a dot).
  7. Leave the "Content Type (MIME)," and "Default Extension for Content Type" boxes BLANK.

  8. Press the "New" button. Another diaglog called "New Action" will open. In the "Action" box type:   open
  9. If you installed perl in `c:\perl' then type the path:
    c:\perl\bin\perl.exe
    into the "Application used to perform action" box. (Otherwise, use the "Browse" button to find YOUR perl executable.) Then press the "OK" button.

  10. Now choose an icon to represent all perl scripts in your Explorer windows (and elsewhere). Press the "Change Icon" button at the top of the diaglog box. Enter the path to an icon file in the "File Name" box (such as the Perl.ico file offered here) or use the "Browse" button if necessary. (You can always change this later by edit-ing the perl file type.) Press the "OK" button.

    Here's what my dialog box looked like at this point:

    Add New File Type Dialog

  11. IF you do NOT have an item for editing text files (such as Notepad) located on your right-click menu when you right-click on a filename in the File Explorer, then you should make a very important addition to this dialog box:

    • Press the "New" button again.
    • This time in the "Action" box type:   edit
    • Then simply enter notepad.exe or the full path to another text editor in the "Application used to perform action" box. Press the "OK" button.

    You should now see the word "edit" in normal-type just above the word "open" in bold-type (the bold-type means this is the default action when you click on a perl file-type in Explorer; it will execute the script). In order to edit your perl scripts, you'll have to right-click on the file and choose "edit" from the menu.

  12. Press the "Close" buttons on BOTH the "Add New File Type" AND "Options" dialog boxes in order to save the new association.

 

The perl Icons


These icons have both a 32x32 and 16x16 rendering in the same .ico file so they can be used pro-perl-y in the Windows™ File Explorer.
Extract the .ico file from its .ZIP archive into the same folder as your perl.exe program (probably located in c:\perl\bin).

Perl icon   Perl.ico   looks like this in an Explorer window:
perl file in Explorer Window

Dowload Perl.ico as a ZIP file now: Perlicon.zip.


Perl2.ico   looks like this in an Explorer window:
Perl icon  perl file in Explorer Window
Dowload Perl2.ico as a ZIP file now: Perlico2.zip.


Please contact me if you have a perl icon to add to this listing!


Associating an Icon (.ico file) with an Active State Perl install

Or: Your .pl files are already associated with perl.exe, but you want to change that plain old .EXE-icon to something worthy of a Perl script !

How To Do It:

[NOTE -- I am NOT responsible for any problems you may have by carrying out the following steps!! If you don't understand something, then ASK first.]

  1. Open the File Explorer.
  2. Click on the "View" menu and choose the "Options" item.
  3. Click on the "File Types" TAB at the top.
  4. Press the "p key" on your keyboard and/or scroll down the list of file-types until you have "Perl File" highlighted. (Make sure the "File type details" area shows that the "Extension:" is PL and that it "Opens with:" PERL).

  5. Click on the "Edit" button. You should see a new dialog box open called "Edit File Type"

  6. Press the "Change Icon" button at the top of the diaglog box. You'll see this warning message (just click on the "OK" button):
  7. Another dialog box called "Change Icon" will open.
    Click on the "Browse" button which shows you a File Open dialog which is also titled "Change Icon."
  8. In the "File Name" box, enter the full path to an icon file (such as c:\perl\bin\Perl.ico) or use the controls to search for the .ico file of your choice. (You can always change this icon again just as we are doing now.) Press the "Open" button.

    With Perl2.ico, your "Change Icon" box should look like this:

    Press the "OK" button.


  9. IF you do NOT have an item for editing text files (such as Notepad) located on your right-click menu when you right-click on a filename in the File Explorer, then you should make a very important addition here:

    • Press the "New" button.
    • In the "Action" box type:   edit
    • Then simply enter notepad.exe or the full path to another text editor in the "Application used to perform action" box. Press the "OK" button.

    You should now see the word "edit" in normal-type just above the word "open" in bold-type (the bold-type means this is the default action when you click on a perl file-type in Explorer; it will execute the script). In order to edit your perl scripts, you'll have to right-click on the file and choose "edit" from the menu.

    Your "Edit File Type" dialog box might look like this now:

  10. Press the "Close" buttons on BOTH the "Edit File Type" AND "Options" dialog boxes in order to save the new association(s).


Please USE Your Browser's BACK BUTTON . . . . . or

Return to The Starman's Perl Homepage