Is there anything about that interop that lets you see the equivalent of 
MsiViewGetError or MsiGetLastErrorRecord? There's typically more error info 
available from those. 

Phil Wilson 

-----Original Message-----
From: Brian Lemke [mailto:brian.le...@apihealthcare.com] 
Sent: Tuesday, October 04, 2011 11:45 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] C# Custom Action Fails when Inserting Temoporary Rows.

I'm hoping that someone can help me out.   I cannot seem to figure out why my 
custom action is constantly failing me.  The action executes on uninstall and 
is to browse the install folder and add files to the RemoveFile table (with a 
few additional properties too) in the MSI so that the file is removed during 
uninstall.   The action is defined as

<InstallExecuteSequence>
         <Custom
                 Action="PurgeFolder"
                 After="InstallInitialize">
                          <![CDATA[REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE]]>
         </Custom>
</InstallExecuteSequence>

The action runs as expected as I can get log messages to show up in the log 
file.  However whenever the action attempts to insert a temporary row (Either 
in the Property Table or the RemoveFile table) I get the exception:

Microsoft.Deployment.WindowsInstaller.InstallerException: Function failed 
during execution. Database:  Table(s) Update failed.
   at Microsoft.Deployment.WindowsInstaller.View.Modify(ViewModifyMode mode, 
Record record)

The method for updating the view looks like


Record newRecord = session.Database.CreateRecord(2);

newRecord.SetString(1, directoryProperty);

newRecord.SetString(2, directory.FullName);

session.Log(String.Format("Adding Property {0}", newRecord.ToString()));

propertyView.Modify(ViewModifyMode.InsertTemporary, newRecord);

I have even tried executing a straight insert statement like "INSERT INTO 
Property ('Property', 'Value') Values (Value1, Value2) TEMPORARY" to no avail.  
And there is no way the directory property name could be conflicting as it is 
part static with a GUID (stripped of the hyphens) appended to the end of it.

I am almost at my wits end here.   I am half a step away from the CA just 
blowing away the whole directory but I am trying to be a good Windows Installer 
citizen here and use the tools as they are.

--Brian
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


*** Confidentiality Notice: This e-mail, including any associated or attached 
files, is intended solely for the individual or entity to which it is 
addressed. This e-mail is confidential and may well also be legally privileged. 
If you have received it in error, you are on notice of its status. Please 
notify the sender immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person. This email comes from a division of the Invensys 
Group, owned by Invensys plc, which is a company registered in England and 
Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 
7AW (Registered number 166023). For a list of European legal entities within 
the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx.

You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail 
recept...@invensys.com. This e-mail and any attachments thereto may be subject 
to the terms of any agreements between Invensys (and/or its subsidiaries and 
affiliates) and the recipient (and/or its subsidiaries and affiliates).



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to