Guy's, I'd appreciate some guidance with writing to an Offline MSI with Deployment Tools Foundation & Powershell. Using SELECT statements to read from the MSI is fine - Inserting a new record seems to be the problem.
What I'm trying to do would work if I use VBScript as shown with the following snippet: ##### VBScript ---------- Set Installer = CreateObject("WindowsInstaller.Installer") Set Database = Installer.OpenDatabase("C:\Temp\installer.msi", 1) 'Transact Mode Set View = DataBase.OpenView("INSERT INTO `Property` (`Property`, `Value`) VALUES ('aaaaa', 'bbbbb')") View.Execute Database.Commit ---------------------------- As expected, The new property and values are written to the Property table. If I try to replicate this with PowerShell & DTF, the closest I can write i like this: ##### PowerShell ---------- # Add Required Type Libraries Add-Type -Path "C:\Program Files (x86)\WiX Toolset v4.0\bin\WixToolset.Dtf.WindowsInstaller.dll"; # Open an MSI Database $oDatabase = New-Object WixToolset.Dtf.WindowsInstaller.Database("C:\Temp\installer.msi", [WixToolset.Dtf.WindowsInstaller.DatabaseOpenMode]::Transact); #Open a View $oView = $oDatabase.OpenView("INSERT INTO `Property` (`Property`, `Value`) VALUES ('aaaaa', 'bbbbb')"); $oView.Execute; $oDatabase.Commit; ----------------------------- I've tried this with Toolset 3.9 & 4.0. I've also tried escaping the backtick in case that was causing the failure (and not using them at all). Nor can I get an expected outcome using a record object. Has anyone else had problems in this area or can someone see a flaw with my syntax? Regards & Thanks Laurie -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/INSERT-INTO-an-offline-MSI-with-DTF-tp7599665.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