Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Edit .msi database programatically

Edit .msi database programatically

Scheduled Pinned Locked Moved C#
csharpdatabasewindows-admin
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asad Hussain
    wrote on last edited by
    #1

    Is there a way to edit the msi database with c#. I want to write a program that will change just one registry entry within the msi database and then email the msi to the client. This will save me the hassle of recompiling the msi and then emailing it to the client. Thanks in advance.

    C D S 3 Replies Last reply
    0
    • A Asad Hussain

      Is there a way to edit the msi database with c#. I want to write a program that will change just one registry entry within the msi database and then email the msi to the client. This will save me the hassle of recompiling the msi and then emailing it to the client. Thanks in advance.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Highly doubtful, an MSI is compressed. Christian Graus - Microsoft MVP - C++

      1 Reply Last reply
      0
      • A Asad Hussain

        Is there a way to edit the msi database with c#. I want to write a program that will change just one registry entry within the msi database and then email the msi to the client. This will save me the hassle of recompiling the msi and then emailing it to the client. Thanks in advance.

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        This is not an easy task. You have to get to know the finest of details of how an MSI database works and how all the tables relate to each other. You can start by reading this[^] and following all the links. Or you can just get Wise for Windows Installer, or some other product that can edit MSI files directly. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        1 Reply Last reply
        0
        • A Asad Hussain

          Is there a way to edit the msi database with c#. I want to write a program that will change just one registry entry within the msi database and then email the msi to the client. This will save me the hassle of recompiling the msi and then emailing it to the client. Thanks in advance.

          S Offline
          S Offline
          Sean Michael Murphy
          wrote on last edited by
          #4

          Asad Hussain wrote: Is there a way to edit the msi database with c#. I want to write a program that will change just one registry entry within the msi database and then email the msi to the client. If you download the platform SDK[^], you get a tool called "Orca" which you can use to edit the MSI database. If you know what you want to change (in general, changes to the Registry table are very straigtforward), it's very easy to effect and save the change. If you are determined to do the changes programatically, this article[^] provides the interop signatures and sample code you'll need. Once you've opened the database, you just use SQL to UPDATE the tables you want. Share and enjoy. Sean

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups