Installation of Strawberry Perl 5.30.0.1 inspired this question. Users of Active Perl have reported problems with the <FileType>=<OpenCommandString>
pairs created during the installation of Active Perl. For example, ftype perl
at the command prompt returned perl="C:\Perl\bin\perl.exe" "%1"
. The named pair should have read perl="C:\Perl\bin\perl.exe" "%1" %*
if you wanted the invocation of file.perl arg1 arg2
to use the trailing arguments.
Strawberry Perl's installation created an association with the extension '.pl'. assoc .pl
returns .pl=Perl_program_file
. But searching the output of ftype
returns no <FileType>=<OpenCommandString>
pairs including the word 'perl' or the extension '.pl'. 'Perl interpreter' appears with '.pl' ('Perl program file') in the list 'Settings > Apps > Default Apps > Choose default apps by file type' in the Settings app.
Now my question - what is the default Open Command String issued when I double-click on a file with an associated file extension if <FileType>=<OpenCommandString>
has not been set? Is it something like <FileType>="C:\Path\" "%1" %*
? Here "%1" is substituted for the file name, %* is substituted for a list of arguments, per documentation (ftype - Microsoft Docs).
What do I lose if <FileType>=<OpenCommandString>
is not set?
perl="C:\Perl\bin\perl.exe" %*
. What do you have inregedit
forHKEY_CLASSES_ROOT\.pl
?ftype <FILETYPE>
returns a value only if an Open Command String is defined. "Open" is only one Verb that Strawberry Perl could set as the Default for ".pl". It appears that they have introduced a non-canonical verb, "Execute Perl Program", as the Default (Computer\HKEY_CLASSES_ROOT\Perl_program_file\shell\Execute Perl Program\command = C:\Perl\Strawberry\perl\bin\perl.exe "%1" %*
).C:\Perl\Strawberry\perl\bin\perl.exe "%1" %*
, "%1" appends the filename for which, here,Execute Perl Program
was called. I guess it would require a new question to explore effects of dropping "%1". I'll keep it in mind and do so if the current configuration leads to problems.