A typo.  A simple typo mistake.

-----Original Message-----
From: Brian Lemke [mailto:brian.le...@apihealthcare.com] 
Sent: Thursday, October 06, 2011 7:36 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] C# Custom Action Fails when InsertingTemoporaryRows.

Thanks Jacob.   With some help from your post I seem to have gotten it to at 
least now not error.  It seems to add all the records however now its time to 
figure out why it is not actually deleting any of the files....

--Brian

-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] 
Sent: Wednesday, October 05, 2011 10:05 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] C# Custom Action Fails when Inserting TemoporaryRows.

I'm not certain what your exact problem is, but looking at the schema
for the remove file table leads me to believe you are missing fields
that are not nullable.

I've used:
const string REMOVEFILES_VIEW = @"SELECT `FileKey`, `Component_`,
`FileName`, `DirProperty`, `InstallMode` FROM `RemoveFile`";

...

           var foldersToRemove = Directory.GetDirectories(dataFolder,
@"*", SearchOption.AllDirectories);

            var view = session.Database.OpenView(REMOVEFILES_VIEW,
null);
            view.Execute();

            foreach (var folderToRemove in foldersToRemove)
            {
                
                var guid = Guid.NewGuid();
                string folderProperty = string.Format(@"dir_{0}",
guid.ToString(@"N"));
                string fileKey = string.Format(@"file_{0}",
guid.ToString(@"N"));
                string folderKey = string.Format(@"folder_{0}",
guid.ToString(@"N"));

                session[folderProperty] = folderToRemove + @"\";

                // Remove all the files
                var record = session.Database.CreateRecord(5);
                session.Log(@"FileKey= " + fileKey);
                record.SetString(1, fileKey);
                record.SetString(2, "Component Name that will always be
installed");
                record.SetString(3, "*.*");
                record.SetString(4, folderProperty);
                record.SetInteger(5,
(int)eInstalMode.msidbRemoveFileInstallModeOnRemove);
    
                view.Modify(ViewModifyMode.InsertTemporary, record);

                // and remove the folder
                record = session.Database.CreateRecord(5);
                record.SetString(1, folderKey);
                record.SetString(2, "Component Name that will always be
installed");
                record.SetString(3, null);
                record.SetString(4, folderProperty);
                record.SetInteger(5,
(int)eInstalMode.msidbRemoveFileInstallModeOnRemove);
    
                view.Modify(ViewModifyMode.InsertTemporary, record);
                
            }
            view.Close();
...

with success.  Note, I am recursively adding all files and folders from
my base folder to be removed. 

Jacob

-----Original Message-----
From: Brian Lemke [mailto:brian.le...@apihealthcare.com] 
Sent: Wednesday, October 05, 2011 9:48 AM
To: General discussion for Windows Installer XMLtoolset.
Subject: Re: [WiX-users] C# Custom Action Fails when Inserting
TemoporaryRows.

The scenario I am trying to handle is the cancel during uninstall.   If
I were to just bomb the folder the rollback wouldn't work and it would
delete the folder anyway.   I am going to try and see if I can pressure
the team into using 3.6.  Don't know if it will be an issue or not.
Initially they said no but maybe I can get them to budge.

--Brian

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

I understand maintaining the customers data but isn't the goal here to
remove it? Which I agree is against the rules normally but it would
appear that is what is wanted... Did I miss something?

Jon



-----Original Message-----
From: Bob Arnson [mailto:b...@joyofsetup.com] 
Sent: Tuesday, October 04, 2011 10:23 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] C# Custom Action Fails when Inserting
Temoporary Rows.

On 04-Oct-11 15:29, McCain, Jon wrote:
> If that is the case then you shouldn't need to worry about being a
good install writer and just whack the folder or its subfolders that you
don't control with your install.

Of course you should. If there's a failure or other rollback, the user's
data is gone.

--
sig://boB
http://joyofsetup.com/


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


This message (including any attachments) contains confidential and
privileged information intended for a specific purpose, and is protected
by law. If you are not the intended recipient, you must delete this
message and any attachments. You are hereby notified that any
disclosure, copying, or distribution of this message, or any
attachments, or the taking of any action based on it, is strictly
prohibited. Opinions, conclusions, and other information in this message
that do not relate to the official business of API Healthcare
Corporation (API Healthcare) shall be understood as neither given nor
endorsed by API Healthcare.
API Healthcare Corporation
1550 Innovation Way
Hartford, WI 53027



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

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