Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

updating msi contents using orca

2 views
Skip to first unread message

Venesa

unread,
Aug 4, 2003, 1:56:20 AM8/4/03
to
Hi,
I have used Visual Studio .Net to create an MSI file with
customActions.
I need to change the numbers Visual Studio created to
identify files etc with my own meaningful information. I
have used orca and simply searched and replaced to do
this. However, after saving my changes and trying to run
the msi i get error 2356 "Couldn't locate cabinet in
stream:"
I dont really know what this means. I have tried doing a
comparison of the msi database which are virtually the
same, yet i still cant seem to fix the error. All i
wanted to do was change the long numbers to meaningful
info. I have attatched below what the WiDiffDb.vbs
scripts outputs
Am i doing something really silly ?
your help would be appreciated

thanks in advance

Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights
reserved.

File DELETE
[_5ACAFFAB475243569F8144575AE9B234]
File Sequence [_F_Install] {}->{2}
File Attributes [_F_Install] {}->{512}
File Component_ [_F_Install] {}->
{C__5ACAFFAB475243569F8144575AE9B234}
File FileName [_F_Install] {}->
{COMPON~1.VBS|ComponentInstallationScript.vbs}
File FileSize [_F_Install] {}->{8103}
File Language [_F_Install] {}->{}
File Version [_F_Install] {}->{}
File INSERT [_F_Install]
Component KeyPath
[C__5ACAFFAB475243569F8144575AE9B234]
{_5ACAFFAB475243569F8144575AE9B234}->{_F_Install}
CustomAction Source
[_C525B280_E127_4306_9D08_421D008D8785]
{_5ACAFFAB475243569F8144575AE9B234}->{_F_Install}
\005SummaryInformation [8] {}->{LalicV}
\005SummaryInformation [11] {1/08/2003 11:52:56 AM}->
{4/08/2003 3:24:05 PM}
\005SummaryInformation [12] {21/06/1999 5:00:00 PM}->
{4/08/2003 3:24:05 PM}
\005SummaryInformation [13] {1/08/2003 11:52:56 AM}->
{4/08/2003 3:44:01 PM}

Kallely Sajan

unread,
Aug 4, 2003, 3:00:44 PM8/4/03
to
It means that the Media and _Streams tables are not matching. _Streams table
is not visible for you to edit. So, leave the Media table alone.
My suggestion will be not to modify the msi at all. The user is not going to
see any of these things that you are modifying.

--

Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

"Venesa" <acu...@acus.com> wrote in message
news:035b01c35a4d$20ecfe50$a501...@phx.gbl...

Venesa

unread,
Aug 4, 2003, 8:01:03 PM8/4/03
to
However I Need to modify the MSI.
Ill explain, I used Visual Studio .Net to create an MSI,
i have added dialogs etc. Using the msi.lib and the
msiquery.h header file i have written c++ code to add
files to the MSI i.e writing SQL queries that UPDATE and
INSERT rows to tables in the database. However, when
trying to insert a row in the File table or modify and
existing row in the file table the sql query doesnt seem
to work i.e the rows are not added or updated. On the
contrary the sql query works for some tables eg the
InstallExecuteSequence.
I then tried using orca to try and modify the MSI
database manually, by simply changing the generated name
of the file in the File table to a more meaningful name,
then the MSI failed to install with a 2356 error as
mentioned below.
I dont mind if cant modify the _Streams tables because i
dont think its of any use to me, However modifying the
MSI is vital for the project i am working on. This is
because our customers will be given the option of adding
files to the MSI; i have to be able to allow them to do
so, this MSI will then be transfered and executed.

I believe the whole purpose of using the msi.lib and
gaining access to the functions enable modifying the MSI
programmatically, yet it doesnt allow me to do so. Am i
missing something here.

Rgds
Venesa

>.
>

Kallely Sajan

unread,
Aug 4, 2003, 8:35:07 PM8/4/03
to
What you are seeing might be b'cos an UPDATE query can work only on
non-primary key columns. File is the key in the File table.

When you create rows into the File table, always watch out the columns
Attributes and sequence. Reading and re-reading
http://msdn.microsoft.com/library/en-us/msi/setup/file_table.asp will help
you for sure. You can modify the Streams table, through APIs, just that you
have to deal with binary columns.
--

Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

"Venesa" <acu...@acus.com> wrote in message

news:86b301c35ae4$a8f41e40$a001...@phx.gbl...

Venesa

unread,
Aug 5, 2003, 3:36:34 AM8/5/03
to
I have learnt that orca corrupts the MSI file. This what
has been causing me grief.
http://groups.google.com.au/groups?
q=MSI+error+ORCA&start=40&hl=en&lr=&ie=UTF-8&oe=UTF-
8&scoring=d&selm=%23lOyj17HDHA.1608%
40tk2msftngp13.phx.gbl&rnum=42.

When i initially created the MSI file using visual
studio .net it installed fine. However i simply used orca
(the correct way link above describes error in orca) and
changed the default names to meaningful ( i also tried
using a blank template and adding the files
progromattically in c++). Everything remains the same
except for the name changes for the filename and
component name. The Media table contains data in the
Cabinate column, however i dont have a cabinate file. I
get error below when i try installing the MSI.

"The file '_FILE' cannot be installed because the file
cannot be found in the cabinet file '_333...'. This could
indicate a network erro, an error reading from the CD-
ROM, or a problem with this package"

when i tried removing the cabinate value '_333...' i also
get an error 2920

i dont know how the file is linked to the media table and
i have the correct sequence which is simply 1 (as there
is only one file)
the attribute value in the file table is 512.

Rgds
Venesa

>.
>

Dennis Bareis

unread,
Aug 5, 2003, 5:35:27 AM8/5/03
to
Hi,

On Tue, 5 Aug 2003 00:36:34 -0700, "Venesa" <acu...@acus.com> wrote:

>I have learnt that orca corrupts the MSI file. This what
>has been causing me grief.
>http://groups.google.com.au/groups?
>q=MSI+error+ORCA&start=40&hl=en&lr=&ie=UTF-8&oe=UTF-
>8&scoring=d&selm=%23lOyj17HDHA.1608%
>40tk2msftngp13.phx.gbl&rnum=42.

This describes a stupid Orca limitation rather than a issue causing
corruption... I have yet to see Orca cause a problem, when I swear at
it it is usually for usability issues...

>When i initially created the MSI file using visual
>studio .net it installed fine. However i simply used orca
>(the correct way link above describes error in orca) and
>changed the default names to meaningful ( i also tried
>using a blank template and adding the files
>progromattically in c++). Everything remains the same
>except for the name changes for the filename and
>component name. The Media table contains data in the
>Cabinate column, however i dont have a cabinate file. I
>get error below when i try installing the MSI.

If you add filenames or change their keys both or which you appear to
be doing you will have to change the storage used to "hold" the file.
Just adding or changing the File table doesn't do much... Everything
needs to be consistant, it is not a simple process.

>
>"The file '_FILE' cannot be installed because the file
>cannot be found in the cabinet file '_333...'. This could
>indicate a network erro, an error reading from the CD-
>ROM, or a problem with this package"

Well is it in the cabinet?


>when i tried removing the cabinate value '_333...' i also
>get an error 2920

It certainly wouldn't find it then...

>i dont know how the file is linked to the media table and
>i have the correct sequence which is simply 1 (as there
>is only one file)
>the attribute value in the file table is 512.

512 means very little, except that MS weren't thinking at the time,
otherwise it would be the default...
So the summary will control whether or not it is compressed and the
"Media" table tells you were it is imbedded/external etc.
The "File" key is of course required to access the file within a cab
file.

Bye,
Dennis


----------------------------
Dennis Bareis (dba...@KillSpam.labyrinth.net.au)
http://www.labyrinth.net.au/~dbareis/index.htm

Free MSI automation/creation tool:
http://www.labyrinth.net.au/~dbareis/makemsi.htm
----------------------------

Venesa

unread,
Aug 5, 2003, 9:45:02 PM8/5/03
to
Thanks for you help
just one question

">If you add filenames or change their keys both or which
>you appear to be doing you will have to change the
>storage used to "hold" the file. Just adding or changing
>the File table doesn't do much... Everything needs to
>be consistant, it is not a >simple process."

where does it "hold" the file?. You are correct in saying
i have changed the component names and the file names
however there is one thing missing i.e lack of
consistency and i dont know what it is let alone where to
find it and fix it.
I have simply added the files to the File table(the long
name and the short name), added to the component table,
and teh feature tables; however how does the MSI know
where to get the files from i.e the location. I have
changed moved the file in the same location as the msi,
it still complained. I changed the SourceDir to the
location where the file lives and yet again it still
complained. Which brings me to the Media table and i
assume i need to do something in there ... i think ??

Rgds
Venesa

>.
>

Dennis Bareis

unread,
Aug 6, 2003, 4:29:41 AM8/6/03
to
On Tue, 5 Aug 2003 18:45:02 -0700, "Venesa" <acu...@acus.com> wrote:

>Thanks for you help
>just one question
>
>">If you add filenames or change their keys both or which
>>you appear to be doing you will have to change the
>>storage used to "hold" the file. Just adding or changing
>>the File table doesn't do much... Everything needs to
>>be consistant, it is not a >simple process."
>
>where does it "hold" the file?. You are correct in saying
>i have changed the component names and the file names
>however there is one thing missing i.e lack of
>consistency and i dont know what it is let alone where to
>find it and fix it.

I have stuck with compressed files in a single cab either internal or
external so I may not be 100% correct although I think I am :-)

Files can be compressed or uncompressed, inside or outside a cab and
the cab can be external or internal. If internal it is in a stream
and may be accessible via some custom table. The Media table will
indicate where it is.

Whether a file is compressed or uncompressed is controlled via the
summary and/or file attributes.

In your case you had an error message naming a cab file, you would
need to locate this and make the same key changes you made in the file
table to the cab (I don't know the easiest way to do this). If it were
me I'd leave it alone!

If you are adding files you will need to be careful about file
sequence numbers and update the media table accordingly, probably the
easiest way is to create a new cab for your added files and create a
new media table entry.

Is there a reason why you wish to hack existing MSIs, if not then
building a complete MSI is relatively simple with my free tool
("childs play" for simple MSIs). MakeMSI also automates ORCA like
changes to existing MSIs but then it does not make adding files much
simpler than doing so via Orca (except automated).

There is also an SDK script to do with adding files
(wifile(something).vbs I think) however I suspect you have already
exceeded its limitations. It would however show you what it does and
how.


>I have simply added the files to the File table(the long
>name and the short name), added to the component table,
>and teh feature tables; however how does the MSI know
>where to get the files from i.e the location. I have
>changed moved the file in the same location as the msi,

You are talking about uncompressed files external to the MSI, the
relevant directory entries will control where relative to the MSI they
should be placed. Your file attributes would also need to change.

Venesa

unread,
Aug 7, 2003, 11:15:14 PM8/7/03
to
Infact i have looked at the MAKEMSI tool and its very
impressive great tool. Basically Dennis, i am doing
something similar to what you have done but it needs to
be in C++ and i need to finish it in the next two weeks.
I have looked at the scipts provided by microsoft and
used them to my benefit.

Thankyou generous help
Rgds
Venesa

>.
>

0 new messages