Re: File association image for .py

Alex Mandel <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
Luke Dunstan wrote:
> ----- Original Message ----- 
> From: "Alex Mandel" <[email protected]>
> To: <[email protected]>
> Sent: Friday, July 21, 2006 5:13 AM
> Subject: [PythonCE] File association image for .py
> 
> 
>> I know it's a little trivial but it's the kind of thing that end users 
>> really like. Anyone know how to add a registry entry so the .py files 
>> get a nice python icon in the File Explorer.
> 
> Create a registry key: HKEY_CLASSES_ROOT\Python.File\DefaultIcon
> Set the default value of this key to: \Program Files\Python24\python.exe,0
> 
>> I'm assuming that it can be done in the PythonCE.inf for the CAB but I 
>> don't know the syntax. If someone knows how, I think it should be added 
>> to the next release.
> 
> Yes, it will be in the next release.
> 
> Luke

Thanks for the info Luke.

The correct syntax for the inf file is(All as one Line):
HKCR,Python.File,DefaultIcon,0x00000002,"\Program 
Files\Python24\python.exe,0"; DefaultIcon = "\Program 
Files\Python24\python.exe,0"

In the examples I was looking at I wasn't sure what the section after 
the semi-colon was for, it may not be necessary. But I test this line 
and it worked.

Now the only question is if it should be a different icon from the Shell 
exe or if the console-less .pyw should be a different icon than the others.

Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.