in reply to Perl template file in windows new menu

  • Save the Perl template you wish to use immediately under C:\windows\ShellNew -- it is a hidden folder.
  • Start the Registry Editor
  • Open HKEY_CLASSES_ROOT and find the extension for that file type. Add a new key called ShellNew
  • Under the new key, add a string value called FileName
  • Double-click on the string, and modify it to be the filename of the blank template file you created, including the extension
  • Exit the Registration Editor and restart Windows

    • Comment on Re: Perl template file in windows new menu
  • Replies are listed 'Best First'.
    Re: Re: Perl template file in windows new menu
    by inman (Curate) on Mar 22, 2004 at 14:19 UTC
      This is what I tried without success (hence my frustration). I have just installed TweakUI which has a facility to manage templates. I noticed that the template files have been moved under Windows XP. They are now in the C:\Documents and Settings\All Users\Templates directory.

      Thanks!

      update: The Tweak UI procedure

      1. Load up TweakUI and find the 'Template' section in the left hand tree.
      2. Press the 'Create' button and browse to a Perl script that you want to use as a template. (at this point however the contents of the file don't really matter).
      3. TweakUI copies this file to C:\Documents and Settings\All Users\Templates and for some reason gives it a numeric filename. You can edit this file to contain the defaults that you are looking for in a template.
      4. Restart your PC (This is required since Windows Explorer needs to scan your registry for ShellNew keys)

      You can also add a suitable description such as 'Perl Script' to the default value of the HKCR/Perl registry key so that Explorer prompts you with 'new Perl Script' rather than 'new .pl file'