Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit a msi database table

how can i add or delete entry of a msi database table using msidb.exe rather than using the orca.Is there any commandline like below

msidb.exe [msipath][importingFilepath]

Once the file is added the corresponding entries in the msi tables should be updated

Thanks,

like image 967
mystack Avatar asked Sep 15 '25 22:09

mystack


1 Answers

I'll assume you want to do this in C# since you included the C# tag. WiX has a component called Deployment Tools Foundation (DTF - you'll find and SDK chm in the start menu ) that provides an excellent MSI interop.

Consider this:

using Microsoft.Deployment.WindowsInstaller;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            using( var database = new Database(@"C:\test.msi", DatabaseOpenMode.Direct))
            {
            }
        }
    }
}

That gives you the starting point to do anything you want to the database via SQL queries.

like image 189
Christopher Painter Avatar answered Sep 17 '25 11:09

Christopher Painter