assoc/ftype problems

Discussion in 'Perl Misc' started by samwyse@gmail.com, Mar 13, 2006.

  1. Guest

    People seem to pop up from time to time reporting mysterious problems
    with ASSOC/FTYPE, with their reports generally disbelieved. I can now
    be added to that group. Here's an example of what I'm seeing:

    C:\>type test.pl
    #!/usr/bin/perl -w
    use strict;
    die 'args=',join(',',@ARGV);

    C:\>assoc .pl
    ..pl=Perl

    C:\>ftype Perl
    Perl="c:\Perl\bin\perl.exe" "%1" %*

    C:\>"c:\Perl\bin\perl.exe" ".\test.pl" a b c
    args=a,b,c at .\test.pl line 3.

    C:\>".\test.pl" a b c
    args= at C:\Documents and Settings\sdenton\test.pl line 3.


    >From any Explorer window, I can click on "Tools / Folder Options... /

    File Types", scroll down to the PL entry and high-light it, and click
    on "Restore". Afterwards, the ASSOC and FTYPE commands continue to
    give me the same results, but running the last command causes an "Open
    With" dialog box to appear. I can then re-specify the Perl Command
    Line Interpreter and the latter (erroneous) behavior is re-instated.

    If I look again at the Folder Options, the file type for PL is now "PL
    File", while the ASSOC command still reports "Perl". Looking in
    REGEDIT, I see that the default value for HKEY_CLASSES_ROOT\.pl is also
    set to "Perl", while the default value for
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pl
    is unset. The latter key also has an "Application" value set to
    "perl.exe", but deleting it or changing it to the same value shown for
    FTYPE causes things to break. Deleting the entire registry key also
    causes breakage.

    I'm running all of this under Windows 2000 Advanced Server, Version 5.0
    (Build 2195: Service Pack 4). I strongly suspect that some security
    patch has caused the ASSOC and FTYPE commands to be ignored in favor of
    the Explorer settings. Does anyone have any additional information to
    contribute?
    , Mar 13, 2006
    #1
    1. Advertising

  2. Guest

    wrote:
    > People seem to pop up from time to time reporting mysterious problems
    > with ASSOC/FTYPE, with their reports generally disbelieved. I can now
    > be added to that group.


    Things seem to be working now. Unfortunately, I can't say exactly what
    I did to fix things, as I had the opportunity to reboot the system;
    afterwards I made a few changes and found that things were working. I
    can't say if it was the re-boot or the subsequent tweaks that fixed
    things; it may have been a combination of both. OTOH, I seem to be
    unable to re-create the issue now, so it may have been the reboot.
    , Mar 14, 2006
    #2
    1. Advertising

  3. wrote in news:1142362718.058938.100390
    @e56g2000cwe.googlegroups.com:

    > wrote:
    >> People seem to pop up from time to time reporting mysterious problems
    >> with ASSOC/FTYPE, with their reports generally disbelieved. I can now
    >> be added to that group.

    >
    > Things seem to be working now. Unfortunately, I can't say exactly what
    > I did to fix things, as I had the opportunity to reboot the system;
    > afterwards I made a few changes and found that things were working. I
    > can't say if it was the re-boot or the subsequent tweaks that fixed
    > things; it may have been a combination of both. OTOH, I seem to be
    > unable to re-create the issue now, so it may have been the reboot.


    Can we assume then that, from now on, you won't fiddle with registry
    settings willy nilly and then complain about what happens as a result?

    Sinan

    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    A. Sinan Unur, Mar 14, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Susan Baker
    Replies:
    2
    Views:
    800
    kelvSYC
    Jun 26, 2005
  2. Chris
    Replies:
    2
    Views:
    109
    Daniel Berger
    Feb 8, 2006
  3. gregarican

    Assoc method on large array

    gregarican, Nov 14, 2006, in forum: Ruby
    Replies:
    10
    Views:
    192
    gregarican
    Nov 15, 2006
  4. Chad Thatcher

    Beginners question about Array#assoc

    Chad Thatcher, Dec 8, 2006, in forum: Ruby
    Replies:
    6
    Views:
    109
    Edwin Fine
    Dec 9, 2006
  5. Ralph Shnelvar

    Array.assoc

    Ralph Shnelvar, Nov 15, 2009, in forum: Ruby
    Replies:
    4
    Views:
    112
    Ryan Davis
    Nov 15, 2009
Loading...

Share This Page