Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Platformsdk MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 09-18-2008, 06:20 AM   #1 (permalink)
Dennis Bareis
Guest
 
Posts: n/a
Default Re: BUG FYI: Icon table keys longer than 57 bytes corrupt the database

On Tue, 1 Apr 2008 14:41:05 -0700 (PDT), "dbareis [Windows Installer MVP]" <dbareis@gmail.com> wrote:

>>
>> Table * * * * * * * * * *Limit
>> --------------- * * *----------------
>> Binary * * * * * * * * * * * * 55
>> Icon * * * * * * * * * * * * * *57
>> MsiDigitalCertificate * *40
>> MsiEmbeddedUI * * * *48
>> MsiPatchHeaders * * * 46
>> Patch * * * * * * * * * * * * *56
>> SFPCatalog * * * * * * * *51



Is it documented anywhere how the key is created, I know it is mentioned under the Media table.

In a multi key table such as "MsiDigitalSignature" will all the keys be used and if so delimited by a ".",
so that the TOTAL length of the two key fields combined must be less than 39 (40-1 for delimiter)?

Thanks,
Dennis
Dennis Bareis [Microsoft MVP] (dbareis@KillSpam.gmail.com)
http://dennisbareis.com/
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://makemsi.dennisbareis.com/
  Reply With Quote
Old 09-18-2008, 06:20 AM   #2 (permalink)
Dennis Bareis
Guest
 
Posts: n/a
Default Re: BUG FYI: Icon table keys longer than 57 bytes corrupt the database

On Wed, 02 Apr 2008 15:58:07 +1100, Dennis Bareis <dbareis@newsgroups.nospam> wrote:

>On Tue, 1 Apr 2008 14:41:05 -0700 (PDT), "dbareis [Windows Installer MVP]" <dbareis@gmail.com> wrote:
>
>>>
>>> Table * * * * * * * * * *Limit
>>> --------------- * * *----------------
>>> Binary * * * * * * * * * * * * 55
>>> Icon * * * * * * * * * * * * * *57
>>> MsiDigitalCertificate * *40
>>> MsiEmbeddedUI * * * *48
>>> MsiPatchHeaders * * * 46
>>> Patch * * * * * * * * * * * * *56
>>> SFPCatalog * * * * * * * *51

>
>
>Is it documented anywhere how the key is created, I know it is mentioned under the Media table.


Never mind found it (not 100% complete buty i can guess the rest):

Binary data is stored with an index name created by concatenating the table name
and the values of the record's primary keys using a period delimiter. OLE limits stream
names to 32 characters (31 + null terminator). Windows Installer uses a compression
algorithm that can expand the limit to 62 characters depending upon the character.
Note that double-byte characters count as 2.


Bye,
dennis
Dennis Bareis [Microsoft MVP] (dbareis@KillSpam.gmail.com)
http://dennisbareis.com/
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://makemsi.dennisbareis.com/
  Reply With Quote
Old 09-18-2008, 06:20 AM   #3 (permalink)
Adrian Accinelli
Guest
 
Posts: n/a
Default Re: BUG FYI: Icon table keys longer than 57 bytes corrupt the database

"dbareis [Windows Installer MVP]" <dbareis@gmail.com> wrote in message
news:927e3691-e43a-49f6-a3bd-680a16a194cf@c19g2000prf.googlegroups.com...
> Hi,
> Thanks for the detailed reply.
> On Apr 2, 6:09 am, "Adrian Accinelli"
> <hclnospamali...@newsgroup.nospam> wrote:
>> "dbareis [Windows Installer MVP]" <dbar...@gmail.com> wrote in messagenew
>> s:7357a69e-dc83-44a4-a7ac-28137282a970@c19g2000prf.googlegroups.com...
>>> It can be consistently reproduced with orca on Windows Installer
>>> 3.1.4000.4039 on Microsoft Windows XP (5.1.2600 Service Pack 2).
>>> Hope that helps someone,
>>> Dennis

>> I think this is more a limitation in the underlying structured storage
>> technology itself than a bug in Windows Installer. The name of a stream
>> cannot be longer than 62 characters.

> I'd say the schema is flawed (max lengths wrong) and the fact that
> Windows Installer
> corrupts the database rather than rejecting the request is also a bug.


Hmmm seems like a good idea to me that the schema itself limits the size of
primary key on such tables. That'd at least provide editors/generators a
method to know there could be a problem.


>> See official limitation
>> statement:http://msdn2.microsoft.com/en-us/lib...51(VS.85).aspx

> Excellent (non-obvious) point.
>> And Windows Installer related
>> one:http://msdn2.microsoft.com/en-us/lib...19(VS.85).aspx

> This link doesn't seem to work


Strange. It's was supposed to be a link to the _Streams table definition.

MSDN Library -> ... -> Windows Installer -> Windows Installer Reference ->
Installer Database -> Installer Database Reference -> Database Tables ->
_Streams.

< snip >


Sincerely,
Adrian Accinelli


  Reply With Quote
Old 09-18-2008, 06:20 AM   #4 (permalink)
dbareis [Windows Installer MVP]
Guest
 
Posts: n/a
Default Re: BUG FYI: Icon table keys longer than 57 bytes corrupt thedatabase

On Apr 1, 7:52*pm, "dbareis [Windows Installer MVP]"
<dbar...@gmail.com> wrote:

> The subject says it all but I have added all I know about it to my
> MAKEMSI manual, page available online at:
> *http://makemsi-manual.dennisbareis.c...longer_than_57....


In case anyone wants to try the above link in future, as I have
updated my
manual based on the information since discovered this is the new link:
http://makemsi-manual.dennisbareis.c...e_database.htm

Bye,
Dennis
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:26 PM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com