Because most of these are nested in folders created by the application.  I 
would really like to use the RemoveFolderEX element found in Wix 3.6 but I am 
not allowed to use that version yet.   I am forced to stay on 3.5

-----Original Message-----
From: McCain, Jon [mailto:jon.mcc...@inin.com] 
Sent: Tuesday, October 04, 2011 2:03 PM
To: General discussion for Windows Installer XML toolset.
Cc: McCain, Jon
Subject: Re: [WiX-users] C# Custom Action Fails when Inserting Temoporary Rows.

Just curious here but why not use the RemoveFile element within the component 
that initially installed the file or do you not own this file?

Also, AFAIK If you remove all files in the fashion above that directory will be 
removed as well.

Jon W. McCain | Software Engineer - Install
phone & fax +1.317.715.8462 | jon.mcc...@inin.com

Interactive Intelligence Inc.
Deliberately Innovative
www.inin.com



-----Original Message-----
From: Brian Lemke [mailto:brian.le...@apihealthcare.com] 
Sent: Tuesday, October 04, 2011 2:45 PM
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



------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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