The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: hutch-- on October 08, 2005, 01:35:30 AM

Title: XML Genius requred
Post by: hutch-- on October 08, 2005, 01:35:30 AM
I need to be able to produce a tool that pops the bare minimum manifest file for application that run under XP and later versions. The code below is something I scraped off the internet and simply name it the same as the exe file with ".manifest" tacked onto the end of it.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<description>.NET control deployment tool</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


This file is 450 bytes, does anyone know enough about XML to strip it down further so it is smaller but still works ?
Title: Re: XML Genius requred
Post by: gabor on October 08, 2005, 08:55:19 AM
Hello Hutch!


There was a time when I used XML a lot. But I would not call myself a guru.

Ok this is my opinion:
This is the shortest form. It is a simple XML, I mean there are only complex-atomic object relations, more clearly there are just attributes.
I know short forms for complex-complex object relations only.

So maybe I am not right...

One notice: the namespace urn is never used! It might be eliminated then.


ps.: this XML of yours didn't want to let itself processsed by my parser. It has revealed some major bugs in my work...

Greets,Gábor
Title: Re: XML Genius requred
Post by: Eóin on October 08, 2005, 04:01:11 PM
Hi Hutch--, I think the manifest specs (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/setup/application_manifests.asp) are really what you need here. That page will tell you what bits can be left out.
Title: Re: XML Genius requred
Post by: askm on October 26, 2008, 04:33:05 PM
Unearthing this...

Ive been touched by XML interest.

We dont hear too much here.

I was trying to use 'SYSTEM' entities to

get to documents on my computer.

Like instead of "C:\Docu~\Child folder\Child folder2\child file.asm",

"&SYSENT;Child folder2\child file.asm" where

SYSENT would be declared as "C:\Docu~\Child folder\".

Those disparate sections of text would show up in one

document and without scripting. It was a breakthru to me

I thought I had the solution but in 2006 hindsight did I ?

I had Win 2000 Server but the drive (no raid or backup!) crashed.

That was long ago, and it was like getting a bad cramp,

then amnesia.

Anyone XML coding ?
Title: Re: XML Genius requred
Post by: drhowarddrfine on October 26, 2008, 09:46:44 PM
I read the book on XML and used it for a while but forgot a lot, too.  However, I do not see what can be taken out of that as far XML itself.  The content of those entities are obviously Microsoft stuff so what of that can be removed, I wouldn't know.
Title: Re: XML Genius requred
Post by: jdoe on October 26, 2008, 10:53:20 PM

For me the smallest is...

Single line XML with a size of 93*dwords = 372 bytes



<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"/></dependentAssembly></dependency></assembly>   





[attachment deleted by admin]
Title: Re: XML Genius requred
Post by: GregL on October 27, 2008, 03:44:52 AM
hutch,

What do you mean by "pops the bare minimum manifest file"? Take a look at mt.exe (http://msdn.microsoft.com/en-us/library/ms235591.aspx), it attaches manifest files to executables.

As far as I know, that manifest enables XP-themed controls under Windows XP. It's automatic under Vista.

If your application has dependencies on msvcr80.dll or msvcr90.dll, you need additional manifest entries. Your app will fail on Vista without them. I'm not sure about this on XP, maybe just on SP3.

There are also additional entries for Vista UAC compatibility, for instance if you want your application to prompt for Administrator privileges at start-up, or if you just want your application to not be treated as a "legacy" app. A legacy app is "virtualized" if it tries to do anything that requires admin privileges.

[Edit] It's really quite a mess isn't it?

Title: Re: XML Genius requred
Post by: DoomyD on October 28, 2008, 01:13:15 AM
I don't know how much of a help it would be, but the following paths contain the newer versions of comctl32.dll (these are loaded when you utilize a manifest file)
X:\windows\winsxs\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_x-ww_1382d70a           ;Windows XP:
X:\windows\winsxs\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9   ;Service pack 2
X:\windows\winsxs\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83 ;Service pack 3
Title: Re: XML Genius requred
Post by: DarkWolf on December 20, 2008, 09:12:20 PM
The namespace urn is being used, he set it to default so that all elements belong to that namespace.

Not knowing the schema for microsoft's manifests the only thing I see to "compress" this is too remove whitespace like jdoe suggests.