Re: C# and native resources

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx> wrote in message news:e4gEk6obIHA.5900@xxxxxxxxxxxxxxxxxxxxxxx
Problem: C# 2.0 doesn't imbed a UAC manifest in the EXE files that it produces.
Problem: The suggested solution on MSDN is unworkable (manually opening the EXE using VS as a resource editor and inserting the manifet resource).
Problem: Changing the C# project to explicitly link a .RES file suppresses the generation of the native VS_VERSIONINFO resource by the C# compiler.

All in all, MS made it harder than necessary to produce a Vista-compliant EXE from C# 2.0.

So how have people solved this problem?

It seems like some kind of command-line tool to insert the manifest resource after the fact would be a good solution - there are a variety of such tools on that market, all of which seem overpriced for such a simple task.

Any free tools out there that can insert a manifest resource into an existing EXE?

-cd




Carl, the Windows SDK comes with a tool called the "Microsoft (R) Manifest Tool" the PE file is: mt.exe.

You can use this tool to embed a manifest in a post build step in VS2005.
VS2008 supports this by default, see the project settings.

Willy.


.



Relevant Pages

  • RE: Windows Installer removes embedded resource manifest ?
    ... will need to embed an manifest file in the win32 resource collection. ... you found the res manifest occur in the built exe but disappear ... Since you said you have to use the "Post Build" event to inject the win32 ...
    (microsoft.public.vsnet.general)
  • C# and native resources
    ... The suggested solution on MSDN is unworkable (manually opening the ... EXE using VS as a resource editor and inserting the manifet resource). ... It seems like some kind of command-line tool to insert the manifest resource ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Manifest file as a custom resource.
    ... I've got the standard manifest file part figured out, and even the part when you ... As a resource, you add it as a custom resource and in resource editor it sould display as 24> 1 ... out of the Classic Theme to test things out. ...
    (microsoft.public.vb.general.discussion)
  • Re: XP-Style Theme
    ... Under XP, if there is a manifest with the same name as the exe, Windows ... InitCommonControls), the exe will fail in any number of manners, none ... :>> How can I go about creating a Resource file myself -- none of my VB ...
    (microsoft.public.vb.general.discussion)
  • Re: Running VB6 exe on Windows 7 64bit
    ... I've Googled around and discovered what data needs to go into the manifest to signify that your app is dpi-aware, but I don't know how to embed the manifest into the compiled VB exe file as MMM can do with its RegFree COM manifests. ... The manifest file has to be embedded as a resource into the exe. ... Basically the .rc file among other things can tell the resource compiler which files to include in the compiled resource file. ... In the meantime perhaps Google (eg. "Resource file for embedding manifests") could help. ...
    (microsoft.public.vb.general.discussion)