0
votes

I am building a windows installer for my .NET application and it looks like InstallShield (2012 Spring - Premier Edition) is adding Windows Common-Controls manifest to my icons converting them to DLLs.

This is hitting my application's performance as OS encounters a page fault as it tries to parse the icon image on launch.

Here is the manifest that IS is appending.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="X86"
    name="CompanyName.ProductName.YourApplication"
    type="win32"
/>
<description>InstallShield Icon Res</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="<>"
            language="*"
        />
    </dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel
                level="asInvoker"
                uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>
1
Google "installshield disable advertised shortcut" - Hans Passant
@HansPassant I am not sure how that will work? The reason for performance hit is icon getting converted to DLL. Even if I make it non-advertised, it will still be a DLL competing for pages with my other DLLs. Am I missing your point here or are we on different tracks? - Akshat Goel
If you disable the feature then you won't get the DLL either. Fretting about a page hit is ... unproductive. - Hans Passant
@HansPassant So you mean if I disable advertised shortcut, explorer will not try to parse the same on launch? I can try this. Well, actually page hit is delaying some core DLLs to load with a delay which creates a bad experience. - Akshat Goel

1 Answers

1
votes

First a short digression into why this is happening. The Icon table, where Icons need to be stored to support Windows Installer advertisement, requires that "Icon files that are associated with shortcuts must be in the EXE binary format and must be named such that their extension matches the extension of the target". Thus InstallShield builds the correct format file. And by "build" I really mean it stuffs the icon data in a resource on a template EXE file.

So what's the upshot? You can change the resulting manifest by editing the template. The template is stored in ...\Support\_IsIcoRes.exe, and if you open that in Visual Studio or another resource editor, you can examine or even edit the manifest in RT_MANIFEST (24) \ 1. This file isn't signed (yet) because the build process will have to modify it, and thus would invalidate any signature, so your edits should be safe. That said, keep a backup of the original in case things go awry.