Could you please tell more about the custom action to delete a
directory tree. I am currently using a C++ custom action to delete
directory structure on uninstall. But i love to use a custom action
with roll-back stuff.

On Tue, Jun 9, 2009 at 11:36 AM, Rob Mensching<r...@wixtoolset.org> wrote:
> Ahh, you want to delete a directory *tree*. That is not supported
> natively by the Windows Installer. There is a CustomAction out there
> that will do this correctly (with rollback and all that good stuff). Bob
> is getting it set up.
>
> Curtis Jewell wrote:
>> Let me try and express it better:
>>
>> The files I want to delete are under a certain directory that the MSI
>> sets up to place them in, but could have any name, and be in (created by
>> my program) subdirectories of that directory, and that's the only thing
>> I know about them.
>>
>> They would be useless without the program, and in fact, need to be
>> deleted upon upgrade (due to calling convention changes - some of the
>> files are sent as source code and compiled to match the version of the
>> program) and could be intermingled with files the MSI installs.
>>
>> In that case, the CA can assume anything under that directory that isn't
>> already being deleted by the MSI is fair game to be deleted.
>>
>> "Scorched earth" uninstall, it is, but that's the requirement, at least
>> in my case. I don't know about the original poster, but I figured I'd
>> offer my CA that I'm open-sourcing as an example that he could use.
>>
>> --Curtis
>>
>> On Mon, 08 Jun 2009 22:32 -0700, "Rob Mensching" <r...@wixtoolset.org>
>> wrote:
>>
>>> I'm a little confused by this requirement. Are you saying you won't know
>>> where the files you want to delete exist? How is a CustomAction going to
>>> know any better?
>>>
>>> Curtis Jewell wrote:
>>>
>>>> I should have specified that I was assuming that there was no way to
>>>> know what the additional files were named or where they were located -
>>>> which would be logical for logging directories.
>>>>
>>>> I was told (I think by you) that to do that, it required a CA to tell
>>>> Windows Installer what additional files to delete.
>>>>
>>>> If the file names are known, of course, then RemoveFile tags should be
>>>> added as appropriate.
>>>>
>>>> --Curtis
>>>>
>>>> On Mon, 08 Jun 2009 10:33 -0700, "Rob Mensching" <r...@wixtoolset.org>
>>>> wrote:
>>>>
>>>>
>>>>> Why do you need a CustomAction?  RemoveFiles is a standard action and
>>>>> will handle rollback for you.
>>>>>
>>>>> Curtis Jewell wrote:
>>>>>
>>>>>
>>>>>> If the folder has files in it the MSI didn't put there, it won't get
>>>>>> deleted unless you have a custom action delete the files first (or tell
>>>>>> Windows Installer to do so)
>>>>>>
>>>>>> If you want source for such a custom action, try
>>>>>> http://svn.ali.as/cpan/trunk/Perl-Dist-WiX/src/ClearFolderCA/ClearFolderCA/ClearFolderCA.cpp
>>>>>>
>>>>>> If not, I'm puzzled.
>>>>>>
>>>>>> --Curtis
>>>>>>
>>>>>> On Mon, 08 Jun 2009 13:53 +0530, "Natarajan, Thangaraj (MLITS)"
>>>>>> <thangaraj_natara...@ml.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I have some issue in Removing the Folder during uninstallation. Please
>>>>>>> Find the Wix script below.
>>>>>>>
>>>>>>>      <Directory Id="TARGETDIR" Name="SourceDir">
>>>>>>>       <Directory Id="INSTALLDIR" Name="BACS_ID_Reservation_Interface">
>>>>>>>         <Component Id="COMP1"
>>>>>>> Guid="AC12D5D4-7AF0-4919-BDD7-3708C8C129E5">
>>>>>>>           <File Id="f3" Name="Import_BACS_Reservation_New.dtsx"
>>>>>>> DiskId="1" Source="Import_BACS_Reservation_New.dtsx" />
>>>>>>>         </Component>
>>>>>>>         <Component Id="GRES1"
>>>>>>> Guid="A8D20EDF-5423-4C46-9B14-E1B0E6020FB1">
>>>>>>>           <File Id="f1" Name="DTSRUN_BACS_ID_Reservation_LoadData.bat"
>>>>>>> DiskId="1" Source="DTSRUN_BACS_ID_Reservation_LoadData.bat" />
>>>>>>>           <File Id="f2" Name="Import_BACS_Reservation_New.dtsConfig"
>>>>>>> DiskId="1" Source="Import_BACS_Reservation_New.dtsConfig" />
>>>>>>>         </Component>
>>>>>>>       </Directory>
>>>>>>>       <Directory Id="MLVARIDRESERVATIONDATAFILEPATH"
>>>>>>> Name="DataFilePath">
>>>>>>>         <Component Id="DataFolder"
>>>>>>> Guid="CD61421E-970C-4317-AC67-85225DA0FEC0">
>>>>>>>           <CreateFolder Directory="MLVARIDRESERVATIONDATAFILEPATH" />
>>>>>>>           <RemoveFolder Id="DeleteDataFileFolder"
>>>>>>> Directory="MLVARIDRESERVATIONDATAFILEPATH" On="uninstall" />
>>>>>>>         </Component>
>>>>>>>       </Directory>
>>>>>>>       <Directory Id="MLVARIDRESERVATIONLOGFILEPATH" Name="LogFilePath">
>>>>>>>         <Component Id="LogsFolder"
>>>>>>> Guid="4BBE30A7-43D0-45ae-A1C0-F2FE28A6BCE8">
>>>>>>>           <CreateFolder Directory="MLVARIDRESERVATIONLOGFILEPATH" />
>>>>>>>           <RemoveFolder Id="DeleteLogFileFolder"
>>>>>>> Directory="MLVARIDRESERVATIONLOGFILEPATH" On="uninstall" />
>>>>>>>         </Component>
>>>>>>>       </Directory>
>>>>>>>     </Directory>
>>>>>>>
>>>>>>>     <Property Id="MLVARIDRESERVATIONDATAFILEPATH" Value="E:\ID
>>>>>>> Reservation\SSIS Package\DataFile" />
>>>>>>>     <Property Id="MLVARIDRESERVATIONLOGFILEPATH" Value="E:\ID
>>>>>>> Reservation\SSIS Package\LogFile" />
>>>>>>>
>>>>>>>
>>>>>>> Actually it is creating the Folders on installation. But fails to remove
>>>>>>> the Folder on unistallation. Please help me out in resolving this issue,
>>>>>>>
>> --
>> Curtis Jewell
>> swords...@csjewell.fastmail.us
>>
>> %DCL-E-MEM-BAD, bad memory
>> -VMS-F-PDGERS, pudding between the ears
>>
>> [I use PC-Alpine, which deliberately does not display colors and pictures in 
>> HTML mail]
>>
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to