Associating file types to my Python program

Discussion in 'Python' started by Psymaster, Jul 24, 2003.

  1. Psymaster

    Psymaster Guest

    How could I do that? I'm writing an image viewer and I would
    want to associate all images to be opened with my proggie when
    they are double-clicked.
    Psymaster, Jul 24, 2003
    #1
    1. Advertising

  2. Psymaster

    John Roth Guest

    "Psymaster" <> wrote in message
    news:Xns93C2BBA60F6BEt45fs6vve@130.133.1.4...
    > How could I do that? I'm writing an image viewer and I would
    > want to associate all images to be opened with my proggie when
    > they are double-clicked.


    Do you really want to do that? I'd advise going a bit
    slow, and just get an item on the context menu for
    starters. Look at HKCR\SystemFileAssociations\Image\Shell
    and put your command in there. It will pop up on
    the context menu for all file extensions that have
    a "PercievedType" of "Image", at least under Windows XP.

    Then if you want to make some of them the default,
    you can go ahead, but that's actually a bit more
    difficult since it has to be done file type by file type;
    there's no way of doing it wholesale.

    Just remember one thing: learn the registry editor
    thoroughly first. Appendix A of the Microsoft
    Windows XP Registry Guide can be quite helpful
    if you want to hack file associations.

    John Roth
    John Roth, Jul 24, 2003
    #2
    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. vpcs
    Replies:
    0
    Views:
    1,542
  2. News
    Replies:
    4
    Views:
    389
    Eliyahu Goldin
    Jul 20, 2004
  3. Replies:
    5
    Views:
    341
  4. Steve Knight
    Replies:
    2
    Views:
    743
    Steve Knight
    Oct 10, 2003
  5. Replies:
    1
    Views:
    349
    Larry Smith
    Feb 19, 2007
Loading...

Share This Page