Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: File association on Windows -- broken?

by stevieb (Canon)
on Jan 19, 2021 at 13:41 UTC ( [id://11127099]=note: print w/replies, xml ) Need Help??


in reply to Re^2: File association on Windows -- broken?
in thread [FIXED] File association on Windows

Thanks for the detailed response!

I, too, always use perl script.pl on all systems, Linux included. In all honesty, I never even use Windows, except to develop berrybrew ironically ;)

This feature was solely developed because one of my users had asked for it, and since I don't use Windows, didn't notice the problem until another user stumbled across it.

In your ftype, you're missing a couple of entries. Compare yours:

tempPerl="C:\EX_D\ulisseDUE\perl5.32.64bit\perl\bin\perl.exe"

...to mine:

C:\repos\berrybrew>ftype berrybrewPerl berrybrewPerl=C:\berrybrew\5.10.1_32\perl\bin\perl.exe %1 %*

The %1 is the script name, and %* are any arguments passed to it.

Output (only hitting ENTER once to execute the command):

C:\repos\berrybrew>t\data\assoc.pl Hello, world! C:\berrybrew\5.10.1_32\perl\bin\perl.exe C:\repos\berrybrew>

Script:

use warnings; use strict; print "Hello, world!\n"; print "$^X\n";

I can't repro the original problem that was reported (having to hit enter twice) on three new systems I've spun up and tried it on, so I'm as content as I can be until it gets wider testing after release and I get actual feedback on it.

I'll make a note on this thread when I finish the full release with point form notes on how to test it while actually using berrybrew if you or anyone else is interested in testing it in the larger scheme of things.

As far as registry, I set only HKCR\.pl for the association, and HKCR\berrybrewPerl\shell\open\command for the ftype definition from within the berrybrew library.

Replies are listed 'Best First'.
Re^4: File association on Windows -- broken?
by stevieb (Canon) on Jan 19, 2021 at 15:48 UTC

    Full run using a dev build of berrybrew.

    > assoc .pl .pl=Perl_program_file > ftype Perl_program_file Perl_program_file=C:\Strawberry\perl\bin\perl.exe %1 %* > build\berrybrew list 5.16.3_64 5.10.1_32 > build\berrybrew switch 5.16.3_64 Switched to Perl version 5.16.3_64... > build\berrrybrew associate set berrybrew is now managing the Perl file association > assoc .pl .pl=berrybrewPerl > ftype berrybrewPerl berrybrewPerl=C:\berrybrew\5.16.3_64\perl\bin\perl.exe %1 %* > t\data\assoc.pl Hello, world! C:\berrybrew\5.16.3_64\perl\bin\perl.exe > build\berrybrew.exe switch 5.10.1_32 Switched to Perl version 5.10.1_32... > ftype berrybrewPerl berrybrewPerl=C:\berrybrew\5.10.1_32\perl\bin\perl.exe %1 %* > t\data\assoc.pl Hello, world! C:\berrybrew\5.10.1_32\perl\bin\perl.exe > build\berrybrew associate unset Set Perl file association back to default > assoc .pl .pl=Perl_program_file > ftype Perl_program_file Perl_program_file=C:\Strawberry\perl\bin\perl.exe %1 %*
Re^4: File association on Windows -- broken?
by Discipulus (Canon) on Jan 20, 2021 at 07:41 UTC
    Hello stevieb,

    yes I had a typo, but I have redone all steps correctly and the association still doesnt work correctly.

    The issue is confirmed for version 1803 in this article but I have assoc.exe and ftype.exe not working as expected in version 10 Pro 0.0.19041 N/D build 19041

    They say the bug was introduced with the kb4462919 but please dont follow the insane path of: fixed with this other one which introduced these more bugs fixed with..

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11127099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found