Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Associating a filetype to an icon


1 reply to this topic

mfw

mfw
  • Members
  • 12 posts

Posted 10 January 2006 - 11:32

Hello all,
it is me again smile.gif
I got a simple problem, but it takes me hours of hours to solve it, and know i have no ideas any more.
I want to associate my .vos-file with a special .ico-Icon, what I've embedded into an .exe-file by using a resource file. Than, I edit the registry at HKCR and HKLM\SOFTWARE\Classes like this:

.vos -> vosfile

vosfile\DefaultIcon = "[PathToExe],0"

But, that doesn't work anyway. Is the index 0 correct? It is the only file inside my resource-file, that's why I metioned it to the index 0. I've also tried to assign the constant value, that the icon got inside the resource-file, although 150. But that doesn't work, too.

The only way, I have had success, was to install the .ico-file into INSTALLDIR and to change the registry as follows:

vosfile\DefaultIcon = "[PathToICON]"

Than, the .vos-files were associated with the icon. But I'm not allowed to extract the .ico-file into INSTALLDIR. My manager wants the icon to be embedded into the .exe.

So, is there anybody outthere, who can help me to solce this riddle?
Thx
mfw

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 January 2006 - 15:10

0 should be okay if it's the only icon in the resource. How does it fail? Note that icons can have different images embedded for different sizes and color depths. Also make sure the path to the exe is correct, it may need to be enclosed in quotes if it contains blanks.