News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

XML Genius requred

Started by hutch--, October 08, 2005, 01:35:30 AM

Previous topic - Next topic

hutch--

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 ?
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

gabor

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

Eóin

Hi Hutch--, I think the manifest specs are really what you need here. That page will tell you what bits can be left out.

askm

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 ?

drhowarddrfine

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.

jdoe


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]

GregL

#6
hutch,

What do you mean by "pops the bare minimum manifest file"? Take a look at mt.exe, 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?


DoomyD

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

DarkWolf

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.
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.