Christopher
Tue Mar 11 17:08:03 CDT 2008
Hi,
"Layko Andrey" <Layko Andrey@discussions.microsoft.com> wrote in message
news:66B9E998-BBB5-4621-AD07-EB18791D69C7@microsoft.com...
> I want to add distibutive function into my application. I need to pack
> into
> installation file working files, settings, and resource files, wich can
> differ from initial file. So, I need to know CAB-file structure. Anybody
> have
> any information or links about it? Help me, please.
I don't think there has been any official documentation on this sort of
thing (I haven't ran across it atleast).
CAB files are purely an archive format used to bundle up multiple files into
a single package. What is important for installation of Windows Mobile
software is the name and contents of the files contained within the archive.
There are two main CAB file formats you might encounter with respect to
installation of Windows Mobile software. I'll refer to these as the "older"
and "newer" formats for the purposes of this response.
The "older" CAB file format is based on installation details being stored in
a binary formatted file. The only details I know of with respect to this
format are available at
http://www.cabextract.org.uk/wince_cab_format/ as
part of the cabextract project.
The "newer" CAB file format is based on installation details being stored in
an XML formatted file. The documentation for this file format is slightly
more open. For example you can refer to the FileOperation Configuration
Service provider documentation on MSDN
http://msdn2.microsoft.com/en-us/library/aa455915.aspx
If all you need to do is to replace an existing file with a replacement
(i.e. updated configuration settings file) you shouldn't need to bother with
the technical differences between the two formats. You should be able to
open up the archive, replace your file and then rearchive it. The challenge
will be determining the filename your settings file has within the cab
archive, since the installation process renames them all to have a form
similiar to "myapp~1.008".
You might like to take a look at a blog entry of mine titled "Windows Mobile
Tip: Peeking inside CAB files" -
http://www.christec.co.nz/blog/archives/61
A commerical product I've used in the past to do this kind of thing is
called CE Cab Manager -
http://www.ocpsoftware.com/products.php?nm=cecabmgr&pd=features. I haven't
used the feature but apparently there is a COM automation interface for this
product that allows you to script changes via VBScript or VB6 etc.
Hope this helps,
Christopher Fairbairn