Cosmin Prund wrote:

>There a few ways to solve your problem. I'll enumerate a few:
>(1) Use an EXTERNAL Manifest (search MSDN or Google for ways to generate
>this external Manifest). Since the manifest is not part of your exe you
>may use a single version of your exe and "change" it's ability to show
>theems or not by adding/removing the given manifest. Unfortunatelly
>adding/removing this manifest can't be done from the exe itself, but it
>can be done from the installer.

Unfortunately, with regard to External Manifests, in the topic

Troubleshooting C/C++ Isolated Applications and Side-by-side Assemblies

http://msdn2.microsoft.com/en-us/library/ms235342.aspx

MSDN states:

"On Windows XP, if an external manifest is 
present in the application's local folder, the 
operating system loader uses this manifest 
instead of a manifest embedded inside the binary. 
On Windows Server 2003 and later versions of 
Windows, the opposite is true­the external 
manifest is ignored and the embedded manifest is used when present. "

Ugh!

>(2) Use two versions of the EXE + a loader. Easy to do if you build your
>installation disks with a script.

That requires that users read help files so that 
they know what to install, a known problem.

Alternatively if both versions are in the 
installer's setup files, that requires doubling 
the download time for a large distribution. That 
is very undesirable for those who don't have a broadband connection.

>(3) An API for enabling/disabling theems for a given window exists.
>Using it might be a bit of a pain BUT it should work fine. MSDN and
>Google might help.

If there are many dozens of windows, this 
requires a lot of administration.  A global solution is needed.

I think that one solution might be:

Compile without any manifest, so that OS's other 
than XP are not affected, and then always copy an 
XP external manifest to the installation 
directory with the installation program. If a 
non-XP OS is detected in a setup dll, to delete 
the XP manifest. Since the manifest is a tiny 
file, the overhead is negligible.  Should other 
manifests for Vista be needed in the future, more 
manifest files can be used and the unwanted ones deleted.

An alternative to a setup dll  may be in those 
installation programs which can execute an 
external program when the installation has 
finished. There, run a small console program 
which detects the OS and deletes the manifest if the OS is not XP.

Neither of these methods is elegant. If anyone 
sees a flaw in my logic here, please write.

Might it be possible to put the manifest into a 
loadable resource file which is only loaded if 
the OS is XP, or would that be too late in the 
execution sequence described by Cosmin to change the appearance in time?

Irwin Scollar 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to