Re: embedding a manifest into an executable file on the fly
- From: Eduardo <mm@xxxxxx>
- Date: Sun, 18 Oct 2009 12:32:33 -0200
mayayana escribió:
That sounds like a couple of different issues:
permissions and GUI. But GUI -- getting the
visual style -- is what you're concerned about?
So it's a given that you must have an external
manifest in XP and internal in Vista/7?
I don't want to touch permissions at all, I just want to enable the visual styles (only under Vista and not in XP).
I think it would have to be a very complex job. The
way that resources are set up in a PE file is that
the Section Table (near the beginning of the file)
points to the beginning offset --
and identifies the size of -- the Resource Table. The
Resource Table then has a complex tree structure,
with pointers that are used to find specific resource
types -- and specific items of those types -- spread
out in ever-expanding roots of the tree. (For
instance, icons are one type, VS_VERSION_INFO
is another, strings a third, etc. I think a manifest
is actually a newly defined type. So what you're talking
about is not just packing the manifest into the file.
You'd also need to edit the Section Table and somehow
recalculate pointers along the levels of the tree. To reach
just a single icon requires walking several pointers down
into the Resource Table. Each pointer is a numeric offset.
A pointer either points to the next pointer or, with the
final pointer, points to the actual resource bytes. It's
an interconnected web.
OK, but I'll do it if I have the clear information of what I need to do.
Why not just ship both EXEs and then install according
to OS version?
Because I want to make it ready for general purpose. And also to avoid this additional task of having to prepare more than one exe for the package for every program.
Sometimes I prefer to work a lot in complex things, with the purpose of simplifying and automating the tasks later.
I still don't know how the AV's will consider it when my installer not only decompress an exe, but adds some resources on the fly. I hope that it's not a problem but I'm not sure.
> (And don't forget to check for the *actual*
OS version rather than just believing what GetVersionEx
tells you. :)
I know nothing about "the problem" of GetVersionEx...
.
- Follow-Ups:
- Re: embedding a manifest into an executable file on the fly
- From: mayayana
- Re: embedding a manifest into an executable file on the fly
- References:
- embedding a manifest into an executable file on the fly
- From: Eduardo
- Re: embedding a manifest into an executable file on the fly
- From: mayayana
- embedding a manifest into an executable file on the fly
- Prev by Date: Re: embedding a manifest into an executable file on the fly
- Next by Date: Re: MidiStreaming problem/conflict with HTML Help
- Previous by thread: Re: embedding a manifest into an executable file on the fly
- Next by thread: Re: embedding a manifest into an executable file on the fly
- Index(es):
Relevant Pages
|