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

new tools to Import VBS JPG - Unable to place file in stream - MSIDB

42 views
Skip to first unread message

Dominique

unread,
Jul 7, 2003, 12:11:16 PM7/7/03
to
The VB script works well, thanks for the help.
Is there any new tools in the SDK to automatically import VBS CA's ?
Just to know... I do not want to miss it if ther eis one.

Thanks.

=================================
From: Dominique (dgsc...@ingr.com)
Subject: Importing VBS JPG - Unable to place file in stream - MSIDB
Newsgroups: microsoft.public.platformsdk.msi
Date: 2002-06-28 14:50:49 PST

We have working custom actions in the Binary Table of our MSIs.
We have the correct JPGs for our splash screens of our MSIs.

Our custom actions (VBS scripts) and JPG (splash screens) change with
every products (and versions), and we need to automate the process of
importing VBS and JPG files into the Binary table without going
through:

Orca > Binary Tables > Data Column > Edit Binary Stream > Browse >
Open > Select *.VBS (or select JPG)

I was able import automatically IDT files for all other Tables (but
Binary Table) by creating a command line on the fly.

Command line example:
MsiDb.exe -i *.idt -f "D:\D G S\English\NewIDTs" -d "D:\D G
S\VALIDATION\DGS.MSI"

But for importing VBS in the Binary Table I think in need to use the
-a option?
(-a Name of file to add to the database as a stream. )

I tried the following command lines:

MsiDb.exe -a myvbs.vbs -f "D:\D G S\English\NewIDTs" -d "D:\D G
S\VALIDATION\DGS.MSI"

MsiDb.exe -a "myvbs.vbs" -f "D:\D G S\English\NewIDTs" -d "D:\D G
S\VALIDATION\DGS.MSI"

I tried many other ways, but I did not get it to work correctly.
I get the error message:

"Unable to place file in stream"

Can somebody help me with the syntax to use... or did I misunderstand
the MSI help? What is the syntax to automatically import VBS (and JPG)
into the
Binary table using MSIDB.exe? Can I get some command-line examples to
use with MSIDB.exe ?

Thank you for your help.
Message 2 in thread
From: Rich [Microsoft Windows Installer MVP]
(legaliz...@mail.xmission.com)
Subject: Re: Importing VBS JPG - Unable to place file in stream -
MSIDB
Newsgroups: microsoft.public.platformsdk.msi
Date: 2002-06-30 09:59:58 PST

[Please do not mail me a copy of your followup]

dgsc...@ingr.com (Dominique) spake the secret code
<3bcef786.02062...@posting.google.com> thusly:

You'll have to write a program/script to do this. AFAIK, there is no
tool in the SDK that does exactly what you want. I don't think that
VBScript has a way of doing binary file I/O, so you'll probably want
to do this in C++. Basically, you need to read the contents of the
file into a field of a record and then use an SQL query to set the
record on the MSI.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
Direct3D Book <http://www.xmission.com/~legalize/book/>
izfree: Open source tools for Windows Installer
<http://izfree.sourceforge.net>

Message 3 in thread
From: Ed Fair (ed_...@yahoo.com)
Subject: Re: Importing VBS JPG - Unable to place file in stream -
MSIDB
Newsgroups: microsoft.public.platformsdk.msi
Date: 2002-07-09 07:30:24 PST

I was able to import my VBS CA's into the Binary table as follows:
In this case, installer is at c:\myInstaller.msi, script is in
c:\go5.vbs,
Binary Name=myScript.

set installer = CreateObject("WindowsInstaller.Installer")
set db = installer.OpenDatabase("C:\myInstaller.msi", 1)

set view = db.OpenView("INSERT INTO Binary (Name,Data)
Values('myScript',?)")
set record = installer.CreateRecord(2)
record.SetStream 1, "c:\\go5.vbs"
view.Execute record
view.Close

Dennis Bareis

unread,
Jul 7, 2003, 7:19:57 PM7/7/03
to
Hi,

con...@contactez.net (Dominique) wrote in message news:<fe029ce4.03070...@posting.google.com>...


> The VB script works well, thanks for the help.
> Is there any new tools in the SDK to automatically import VBS CA's ?
> Just to know... I do not want to miss it if ther eis one.

> Our custom actions (VBS scripts) and JPG (splash screens) change with


> every products (and versions), and we need to automate the process of
> importing VBS and JPG files into the Binary table without going
> through:
>
> Orca > Binary Tables > Data Column > Edit Binary Stream > Browse >
> Open > Select *.VBS (or select JPG)

You could use my free tool to perform "orca" like tasks automatically
(as well as create MSIs):

http://www.labyrinth.net.au/~dbareis/makemsi.htm

Bye,
Dennis

0 new messages