Thanks for the suggestion Phill,

What I am trying to do is external to a running MSI.  Since the my original
post I've tried the same DTF functions in C# and was surprised to see
everything work perfectly.  Following on from the VBScript & PowerShell
snippets above, the code below is the same activity in C#.

### C# Code ----------------------

Database oDatabase = new
WixToolset.Dtf.WindowsInstaller.Database("C:\\Temp\\Installer.msi", 
DatabaseOpenMode.Transact);
View oView = oDatabase.OpenView("INSERT INTO Property (Property, Value)
VALUES ('aaaaa', 'bbbbb')");
oView.Execute();
oDatabase.Commit();

-----------------
As C# is using the same DTF resource that PowerShell is, I can rule out a
problem with Deployment Tools Foundation and look more closely to how
PowerShell quirks may prevent the action from running correctly.  C# also
shows how backticks aren't a requirement of the view string either so that
gets rid of the need to accommodate special characters with PowerShell.

It really has me scratching my head as I can't see why it wouldn't work.  :)





--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/INSERT-INTO-an-offline-MSI-with-DTF-tp7599665p7599682.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to