Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Command line arguments not passed in Win7

by ccherri (Acolyte)
on May 13, 2015 at 16:34 UTC ( [id://1126570] : note . print w/replies, xml ) Need Help??


in reply to Re: Command line arguments not passed in Win7
in thread Command line arguments not passed in Win7

In gratitude to the monks who have helped me in the past I wanted to add... I had the command line working on my Windows 7 machine and then had to re-image the hard drive for reasons I can't explain. After the re-image, the command line parameters would not work despite the assoc, ftype, and PATHEXT all being correctly set. After a frustrating day, I just started cruising the registry and found another entry for perl under HKEY_USERS\S-1-blah-blah-blah-Classes\pl_auto_file\shell\open\command. I added the %* and viola! ITS ALIVE!. Not sure why the new instance, but just wanted to throw out there for other frustrated monks. C

  • Comment on Re^2: Command line arguments not passed in Win7

Replies are listed 'Best First'.
Re^3: Command line arguments not passed in Win7
by Anonymous Monk on Dec 21, 2015 at 15:25 UTC
    Thanks! I've been going crazy trying to solve exactly the same problem. I searched the registry for 'Perl.exe' and found exactly the same entry as you. Clicked 'Modify' and added the %* and all my command line arguments are now passed into the Perl script.
Re^3: Command line arguments not passed in Win7
by Anonymous Monk on Nov 13, 2017 at 18:51 UTC
    Thank you! I just had the same issue with Windows 10, and your suggested registry edit worked. There were several places in the registry where I added %* after the "D:\Strawberry\perl\bin\perl.exe" "%1".
      Before I tried your solution on Windows 10 with Active Perl,

      tryit.pl a b c

      using the ".pl" association to invoke Perl did not work, but

      perl tryit.pl a b c

      did work.

      Then I tried your solution of adding %* to reg entries with "C:\Perl64\bin\perl.exe" "%1", and that fixed it so now

      tryit.pl a b c

      works and can see ARGV. Thank you!