title: Updating table in MSI file
body: <p>I am trying to update the Media table in an MSI to append a <code>#</code> to the beginning of whatever is in the Cabinet field.</p>
  
  <p>I have ran:</p>
  
  <pre><code>Cscript WiRunSQL.vbs %CopiedFile% "UPDATE `Media` SET `Media`.`Cabinet`='%CabUpdate%' WHERE `Media`.`DiskId`=1"
  </code></pre>
  
  <p>But that throws up Msi API Error 80004005: OpenDatabase,DatabasePath,OpenMode</p>
  
  <p>I then created a test c# application that replaces whatever is in the Cabinet field with the value. However it just updates the Cabinet field to an empty string.</p>
  
  <pre><code>        var db = new Database(@"C:\Users\Me\test.msi", DatabaseOpenMode.Direct);
  
          var query = db.ExecuteQuery("Select Cabinet from Media"); // gets: blah.cab
  
          string oldCab = query[0].ToString(); // this is 'blah.cab'
  
          string newCab = "#" + oldCab; //this is then '#blah.cab'
  
  
          string updateString = "UPDATE `Media` SET `Media`.`Cabinet` = '" + newCab + "'
          WHERE DiskId = 1";
  
          try
          {
              db.Execute(updateString);
          }
          catch(Exception ex)
          {
  
          }
  </code></pre>
  
  <p>Is there something obvious I'm missing? Or is there another way of achieving this (not using Orca, must be ran from batch file).</p>