In each of your user accounts, open up a cmd.exe window and run

REG QUERY HKEY_CURRENT_USER\Software\Classes\.pl /S
. If you have per-user configuration, this will pop up something like
HKEY_CURRENT_USER\Software\Classes\.pl (Default) REG_EXPAND_SZ PerlScript
. Now, using your value on the right instead of PerlScript below, run
REG QUERY HKEY_CURRENT_USER\Software\Classes\PerlScript /S
. There should be one similar to
HKEY_CURRENT_USER\Software\Classes\PerlScript\shell\run\command (Default) REG_EXPAND_SZ "c:\usr\local\apps\berrybrew\perls\s +ystem\perl\bin\perl.exe" "%1" %*
, which has a key name of "command", and runs perl.exe. You need to make sure that it has a "%1" (with quotes!), which indicates the name of the script, and the %* (no quotes!), which indicates any additional command line arguments to be passed to the script.

If you did a "for all users" install, instead of being in that location, you might need to look in HKEY_CLASSES_ROOT\.pl and HKEY_CLASSES_ROOT\PerlScript (or whatever the right value is) using the same REG QUERY syntax, but with the new key location.

If the working user has "%1" %* and the broken user just has "%1" (or worse, just %1 without quotes), then the broken user doesn't have the right association.

If the working user has one or both of the HKEY_CURRENT_USER and the HKEY_CLASSES_ROOT, but the broken user has neither, then the association wasn't created at all for the broken user, and that will need to be fixed.

Also, you mentioned running perl test.pl, so the script obviously ends in .pl. However, you then try to run it as test welcome, without the .pl. For that to work, you need PATHEXT set properly for all users who try. Thus, for each user, in the same cmd.exe, run echo %PATHEXT%. It needs to include .PL somewhere in the list; mine, for example, is .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PL, with the .PL at the end of the list.

If any of your users are missing either the correct command value, or the .PL in the PATHEXT, those will need to be fixed. If you need help fixing those, please paste in between <code>...</code> tags the results of the various REG QUERY and echo %PATHEXT% commands above for both the working and the broken user (telling us which is which), and we can try to help you get those fixed.


In reply to Re^3: perl interpreter issue by pryrt
in thread perl interpreter issue by Krishna74

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.