VB6 Manifest not working on Windows 7

Matt Wilko picture Matt Wilko · Dec 20, 2010 · Viewed 7k times · Source

I have created a manifest file for a VB6 application that is running on Windows 7 (not for any visual style changes, just to make sure it accesses the common registry and not a virtualised one)

The exe name is Capadm40.exe, the manifest is named Capadm40.exe.manifest and contains the following:

<?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.Capadm40"
     type="win32"/>
  <description>Administers the System</description>
  <!-- Identify the application security requirements. -->
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"/>
        </requestedPrivileges>
       </security>
  </trustInfo>
</assembly>

However, this doesn't seem to make any difference. ie the application is still using the virtualised registry hive. What is also strange is the after I unticked the 'Run this program as an administrator' option in the properties of the application exe, windows still shows a shield on the application icon, leading my to think this is some issue with my windows installation rather than a fault with the manifest. Any ideas?

Answer

Bob77 picture Bob77 · Dec 21, 2010

You're probably running afoul of the fusion cache (and the Explorer Shell's icon cache). External manifests are strongly discouraged anyway, but trying to add one after the program has previously been run often leads to such symptoms.

See Manifest and the fusion cache for a brief description.

You could also touch the EXE to reload the cache.