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

Icon association


9 replies to this topic

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 15 December 2004 - 17:10

I want that automatically an icon is associated when the user creates a file with a specific file-extension after installing our application.

I managed to do this via making use of:
AND File-types within the Advanced Settings of a component
AND the Registry data.

Within the registry data, I create a key "jdffile" with a subkey "DefaultIcon". Within the "DefaultIcon" subkey I set the path to the Iconfile as data of the (Default)-name.

I tested this, and this works. When I create a file "test.jdf", it gets the icon I defined.

However, when I run an MSI validation, I get an ICE33 validation error telling that I do not need to use the registry table to associate icons but the icons and progID Table.

I tried to define the path to the iconfile and its index straight within the ProgID, but then my file-extension didn't get his associated icon.

How do I get rid of this validation warning??

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 December 2004 - 07:45

I guess you're doing something not in the right way when you define the icon in the ProgID settings. this should work.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 20 December 2004 - 17:09

when needing to define the icon to use, I can browse to the Iconfile.
The iconfile is also installed with my application.

Do I need to browse to the icon to my folder where I store all my files to distribute or do I need to use the [INSTALLDIR]property to point to the location where the icon file will be installed??



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 December 2004 - 09:40

You must pick up the icon in the build location, not on the destination location.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 21 December 2004 - 13:11

Stefan,

I already tried to select the iconfile within the 'ProgID's'-section of the File Types section and also defined the iconindex, but this doesn't work.

I've entered this data:

Extensions:
========
jdf -> ProgID = jdffile. (No Verb defined because I don't want that 'something' happens when the user doubleclick's on a file with this extension).

ProgID's:
======
jdffile -> ComClass=<none>
-> Description=<my description>
-> IconFile = [ISPROJECTDIR]Resources\JDF.ico
-> IconIndex = 0

With this it should work, but it doesn't.
As I don't create via the registry table a subkey 'DefaultIcon' with the path to the JDF.ico(so I'am forced to install this iconfile) under the 'jdffile' key,.... files with the extension *.jdf doesn't get the appropriate icon.

Do I miss here something??

Thanks in advance for your help.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 December 2004 - 18:16

Not sure. A verb may be required. I think you can specify the verb noopen for that purpose.

Christoph

Christoph
  • Full Members
  • 81 posts

Posted 22 December 2004 - 12:07

Stefan,

when I add the verb 'NoOpen' with only the "Display Name" filled in(and I remove the regkey I created before), it works... BUT

when I have a look within the registry, I see that this key is created:
'HKCR\jdffile\shell\NoOpen\Command'.
This key has two values '(Default)' and 'command'. The '(Default)'-keyvalue has the path to the application I install as data.

So, when I doubleclick on a file with the extension .jdf(=jdffile), it opens the application I have installed but this is not what I want. I want that the user gets the default windows dialog where he can choose an application to open the file with.

I there a reason why these '(Default)' and 'Command' keyvalues are filled with data??

Thanks for your help so far...

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 December 2004 - 10:13

I'm not sure. NoOpen (if I got the name correct, better check with MSDN) should not open your application, nor bring up the application seledction dialog. Instead it should display an error message like "this file should not be opened directly"

KapilMarwah

KapilMarwah
  • Members
  • 32 posts

Posted 23 December 2004 - 13:36

I dont think NoOpen would work here. If you use NoOpen as a verb using windows Installer it creates a registry entry "HKEY_CLASSES_ROOT\<ProgID>\shell\NoOpen\command\" and a default value giving the path to your executable.
But actually for NoOpen to work the registry entry should be HKEY_CLASSES_ROOT\<ProgID>\NoOpen

Also if you try to use the installer to create a ProgID without associating it with a ClassID or an Extension with a verb, it does not work, no progID is created.

Only way is to bear the warning and use the Registry Table to do this.

Kapil



Christoph

Christoph
  • Full Members
  • 81 posts

Posted 06 January 2005 - 13:56

I was able to achieve the behaviour I want, by defining the NoOpen verb and remove afterwards the registry keys not needed by using an installscript custom action.

It seems it was not possible to use the RemoveRegistry table.

Thanks for all your help. Discussing the problem with somebody often leads to the solution even when there was no exact solution mentioned. :-)