When I invoke my Perl scripts in the Windows environment without invoking perl
first, the parameters are not passed to my script.
For example,
To sum up.
ftype is old and cmd.exe doesn't care whatever it says.
The real deal is the HKEY_CLASSES_ROOT\Applications\perl.exe\shell\open\command thing.
Just run: reg add HKEY_CLASSES_ROOT\Applications\perl.exe\shell\open\command /ve /d "C:\strawberry\perl\bin\perl.exe \"%1\" %*" /f
and everything will be ok. (* given that "C:\strawberry\perl\bin\perl.exe" is the exact path to your perl installation.*)
/ve is meant to work on de “(Default)” REG_SZ value /d is to assign “data” to the “value” /f to force substitution (or overwriting) of the preexisting value
In fact, if assoc .pl=Whatever
and ftype Whatever
doesn't exist (never assigning a value to it, or doing ftype Whatever=
to unassign), the scripts could still be invoked without prepending perl.exe
.
So, if using Windows >= 6.0 (Vista, 2008, 7, etc.) just forget that the commands assoc and ftype exist at all. Don't bother. Go reg.exe!