I've been fighting a few Windows boxes here that are balky with assoc and 
ftype. What I've found is that:

1) You can't have any perl processes open when you run the fype and assoc 
2) You have to run ftype first and assoc second.
3) You must be an Administrator account when you run the fype and assoc 
4)*** You must run the fype and assoc commands in a window that your 
started by RIGHT CLICKING A SHORTCUT for cmd.exe and you MUST chose RUN AS 
AN ADMINISTRATOR. Just being an administrator and opening a command window 
is not enough.

ftype PerlScript="C:\Strawberry\perl\bin\perl.exe" "%1" %*
assoc .pl=PerlScript

Obviously, change the path to Perl as per your local install.
Matthew O. Persico

30 Rockefeller Plaza
New York, NY 10112
212 632 6136

From:   kmx <k...@atlas.cz>
To:     win32-vanilla@perl.org
Date:   04/17/2014 07:53 AM
Subject:        Re: Run an external program and capture its output

On 17.4.2014 13:49, John Emmas wrote:
> On 17/04/2014 11:34, sisyph...@optusnet.com.au wrote:
>> .
>>> This is one that comes up from time to time - it's not specific to 
>>> Strawberry Perl, and has to do with file associations and something 
>>> else .... a registry setting ? ... I can never remember the details, 
>>> nor of how to search for it.
>> Aaah ... here's the solution I was thinking of:
>> http://www.perlmonks.org/?node_id=1024609
> Wow, I'm amazed!  I've been programming on Windows for nearly 30 years, 
> yet I never encountered this problem before.  Nevertheless you're 
> absolutely right Rob.  Placing the word "perl" at the start of my 
> line solved the problem!  Sadly, the fix suggested by that article 
> work in my case - but no matter, at least I've got a solution now.
> One more question - is there a way to obtain the Windows version 
> information using a perl script?  For example, can I obtain the value of 

> WINVER somehow?



Reply via email to