Search

Setup & Deployment project creates poor DefaultIcon for file type by David Lowndes

Closed
as Won't Fix Help for as Won't Fix

1
0
Sign in
to vote
Type: Bug
ID: 540424
Opened: 3/9/2010 11:25:49 AM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
In a setup & deployment project, if you have a file type (extension) to register as part of the setup and use the type's "Icon" property, the resultant entry in the registry is like this - under the ProgID section:

[HKEY_CLASSES_ROOT\MyApp.ProgID\DefaultIcon]
@="D:\\Windows\\Installer\\{EA478FED-F9B4-4176-88C3-41937786872D}\\_6FEFF9B68218417F98F549.exe,0"

This made up EXE only appears to contain a single resolution icon while the application EXE specified in the setup project's Icon setting has multiple resolution icons (so that it plays by the rules in Windows Vista/7 and scales nicely).

1. Why does the setup project create this EXE - if I change the resitry setting to use the installed application EXE the images in Explorer scale correctly.
2. Assuming it does create the EXE for a good reason, it needs to use all the icon resolutions in the original EXE.
Details (expand)

Product Language

English

Version

Visual Studio 2010 Release Candidate

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

Create a simple project that produces an EXE.
Ensure that the EXE has multiple resolution icons (for example, 16x16, 32x32, 48x48, 64x64, 256x256 - as recommended in the Windows UI guidelines).
In the setup project, add a file type to register and set the icon to be that of the installed EXE component.
After installation, select a file of the registered type in Explorer and have the Details pane displayed - this will display the icon for the file type.
Resize the Details pane - note that the icon doesn't fit the space available (as conforming applications do).

Now, change the registry setting for the DefaultIcon so that it uses the installed EXE.

Log off/on

Repeat the test and note that the icon in the Details pane is scaled nicely.

Actual Results

The icon used appears to be a single resolution one.

Expected Results

The icon should scale as it does when the real EXE is used.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
File Name Submitted By Submitted On File Size  
SetupIconIssue.zip (restricted) 3/10/2010 -
Sign in to post a comment.
Posted by Francois Botha on 11/18/2011 at 6:20 AM
Was this perhaps fixed in VS 2010 SP1?
Posted by David Lowndes on 3/16/2010 at 8:41 AM
>You can do that by double-clicking on [Binary Data] which will prompt you an editor to browse to the icon file.

Doh - it never occurred to me to try that!

I think you can go ahead and close this now, I'm happy to keep using my work around and hope this will be resolved in the next version.
Posted by Microsoft on 3/15/2010 at 4:17 PM
You can do that by double-clicking on [Binary Data] which will prompt you an editor to browse to the icon file.

We can't see any obvious side-effects of doing your other workaround but keep in mind that this approach is not supported.

Please let us know if you have other questions. If we don't hear back within 3 days, we will close this issue.

Thank you.
Posted by David Lowndes on 3/13/2010 at 5:03 AM
Regarding the work-around:

>4)    Replace the icon with the high-resolution icon on the right pane

How?

What's listed there in Orca is just the (strange) name of an EXE - presumably the one that gets referenced in the DefaultIcon registry setting?

An easier workaround (for the DefaultIcon case) is to abandon use of the Icon setting and just add a registry setting to explicitly set the DefaultIcon key to the path of the installed EXE. That seems to work - but I don't know if there are perhaps some situations where this isn't the right thing to do.
Posted by Microsoft on 3/11/2010 at 5:52 PM
Hi,

This is indeed a bug in the setup project. Unfortunately since we're in the final milestone of Visual Studio 2010, we won't be able to fix this in the upcoming release. We will consider to fix this in the future release. In the meantime, to workaround this problem, you may do the following:

1)    Follow the instructions on this page to download Orca: http://msdn.microsoft.com/en-us/library/aa370557.aspx
2)    Right-click on the output MSI and select “Edit with Orca”
3)    Navigate to the Icon table on the left pane
4)    Replace the icon with the high-resolution icon on the right pane
5)    Save changes

Doing the above will enable the high resolution icon to display appropiately. Please let us know if you have any questions on this workaround. If we don't hear back within 3 days, we will close this issue.

Thank you.
Posted by Microsoft on 3/10/2010 at 10:42 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by David Lowndes on 3/10/2010 at 2:31 AM
Similarly, if the same icon is specified as the AddRemoveProgramsIcon for the setup, the details pane in the Add/Remove programs applet also exhibits the same (non-resizing) issue.
Posted by David Lowndes on 3/10/2010 at 2:28 AM
Project added.

Open the attached project.
Note that in the SetupIconIssue there's an icon file "ExpPrint.ico" that contains several icon formats up to 256x256 resolution.
Note that in the IconIssueSetup project, under File Types, the .myfiletype extension is set to use the icon from "Primary Output from SetupIconIssue" - which is the multiple resolution icon.
Build the project & install it.

Ensure you have the Details pane showing in Explorer and select a file with the extension .myfiletype.
Note the icon shown in the Details pane - it doesn't scale (as it should do) when you resize the details pane.
Posted by Microsoft on 3/9/2010 at 9:57 PM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 3 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Visual Studio Product Team
Posted by Microsoft on 3/9/2010 at 7:05 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.