http://www.perlmonks.org?node_id=11110256


in reply to Re^6: strawberry win10 no ARGV
in thread strawberry win10 no ARGV

I make some changes to regedit which didn't seem to help.

Too bad you didn't show us what changes, otherwise, we could have helped you figure out what you did wrong.

However i found when the first argument is the full path to perl.exe everything works! either from the cmd line or using qx inside the wrapper script.

Yes, that's because by supplying the full path to perl.exe first, you are no longer relying on the Windows file association, and are instead directly invoking the perl interpreter yourself. That is a reasonable idiom. However, your double-click won't work.

If you want double-click to work, you'll need to put in a bit more effort. In this post, you said that .pl maps to pl_auto_file. If you do a reg query HKCR\pl_auto_file /s, you can show us what you actually have set, and we can help you debug. For example, mine (which uses PerlScript, not pl_auto_file), can be seen below

C:\usr\local\share\PassThru\perl>reg query HKCR\PerlScript /s HKEY_CLASSES_ROOT\PerlScript (Default) REG_EXPAND_SZ Perl Script HKEY_CLASSES_ROOT\PerlScript\shell (Default) REG_EXPAND_SZ run HKEY_CLASSES_ROOT\PerlScript\shell\run (Default) REG_SZ Run Perl Script Icon REG_SZ "c:\usr\local\apps\berrybrew\perls\system\win32\ +strawberry.ico" HKEY_CLASSES_ROOT\PerlScript\shell\run\command (Default) REG_EXPAND_SZ "c:\usr\local\apps\berrybrew\perls\s +ystem\perl\bin\perl.exe" "%1" %*

update: trimmed extra verbs to avoid confusion