Finding an executable under win32

Max Khesin max at cNOvSisiPonAtecMh.com
Thu May 1 19:40:53 EDT 2003


1) afaik windows does not use mime types to launch appropriate apps, it uses
file extensions and registry.
2) if you call winAPI ShellExecute("file.doc") which u can do with
pythonwin, i think, it will do the windows-registy-voodo lookup and
hopefully launch Word for you.

--
========================================
Max Khesin, software developer -
max at cNvOiSsPiAoMntech.com
[check out our image compression software at www.cvisiontech.com, JBIG2-PDF
compression @
www.cvisiontech.com/cvistapdf.html]


"Uwe C. Schroeder" <uwe at oss4u.com> wrote in message
news:vb3baohiicb24b at corp.supernews.com...
>
> Hi,
>
> I have an app that stores arbitrary files in a database. It keeps the
> mimetype. When I load a file out of the database I want to open the file
> with an application according to the mimetype.
> This is no big deal under linux since one can store application names in
the
> DB and use which() to find the executable.
> On Win32 however the applications are usually not in the path. I know
there
> are keys in the registry defining which app to use for which extension.
> There are also other keys defining the command to start the application.
>
> I'm pretty sure someone had this problem before. Is there a module or
> something that actually takes a file extension (or mimetype) and finds the
> corresponding application from the windows settings ?
> I googled like crazy, read all docs I could find, but nothing....
>
> Thanks
>
>         UC
>
> --
> Open Source Solutions 4U, LLC   2570 Fleetwood Drive
> Phone:  +1 650 872 2425         San Bruno, CA 94066
> Cell:   +1 650 302 2405         United States
> Fax:    +1 650 872 2417






More information about the Python-list mailing list