views:

210

answers:

1

I have sevevral custom actions as part of an MSI project, defined in vS2008.

The actions are defined as short Javascripts. There are two that run on install, and one that runs on uninstall. Everything works fine.

These scripts gets installed as regular files in the Application Folder. The scripts that run during installation, delete themselves at the end of execution. The script that runs on uninstallation sits in the application directory until it's needed.

I learned that there is this thing called a "Binary Table Stream" in MSI. I don't know how it works, but apparently custom action scripts can be stored as Binary Table Streams, which means they don't get installed in the filesystem.

Can I configure, in VS2008, a custom action script to be embedded into the MSI as a Binary Table Stream?

EDIT: I think the binary table stream is just a way of saying, the file in question is stored in the table named "Binary" in the MSI.

If that's the case, maybe another question is, can I post-process the MSI to move a script from "not binary table" to the binary table?

+1  A: 

I don't have VS2008, but the way you'd do this by editing the msi directly in something like Orca is:

  1. Open Binary table, create new row.
  2. Click on Binary field, browse to your script, stream it into the field.
  3. In the CustomAction table, change the type to reflect that it's a jscript stored in the binary table and change the source to point to your new binary table entry.

Visual Studio probably has a different way of doing this, but hopefully, this gives you something to start with.

Jim