VB6 Manifest does not work on Windows 7

I created a manifest file for a VB6 application running on Windows 7 (not for any visual style changes, just to make sure it accesses the regular registry, not virtualized)

The exe name is Capadm40.exe, the manifest is called 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, it does not seem to make any difference. those. the application still uses a virtualized registry hive. It’s also strange that after I turned off the option “Run this program as administrator” in the exe application properties, the windows still show a screen on the application icon, which makes me think that this is some problem with my Windows installation, but what the error is in the manifest. Any ideas?

+4
source share
4 answers

I would use the creator of the LaVolpe manifest, works great for XP, Vista and 7: http://www.vbforums.com/showthread.php?t=606736

+1
source

You have probably encountered a merge cache (and explorer icon cache). In any case, external manifestations are strongly discouraged, but trying to add one after the program was previously launched often leads to such symptoms.

See the manifest and cache fusion for a brief description.

You can also touch exe to reload the cache.

+2
source

I found only one manifest that works on all 9x + platforms. or even works at all. I tried all the examples, articles, etc.

the version number or something else added to it will kill him. a possible exception is an additional parameter on requestExecutionLevel, which looks normal. you can change the level and you can add uiAccess. it is permissible. after testing the binary number multiple times, I found out that these nice additional manifest features that Microsoft offers just make windows cause various errors.

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2"> <ms_asmv2:security> <ms_asmv2:requestedPrivileges> <ms_asmv2:requestedExecutionLevel level="asInvoker"> </ms_asmv2:requestedExecutionLevel> </ms_asmv2:requestedPrivileges> </ms_asmv2:security> </ms_asmv2:trustInfo> </assembly> 
0
source

Applying styles in the VB6 IDE:

Save this text in a file called vb6.exe.manifest in the same folder as the vb6.exe file:

 <?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="Microsoft.VisualBasic.IDE" type="win32" /> <description>Visual Basic 6 IDE</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> </assembly> 

Add spaces to the end of the file until it reaches 672 bytes (a few of 4).

Then:

  • download Resource Hacker and open it as administrator
  • File> open VB6.exe file
  • File> New empty script
  • Type: 1 24 "vb6.exe.manifest"
  • Compile script
  • Save
-1
source

Source: https://habr.com/ru/post/1332750/


All Articles