Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom Action - Delete Folder


3 replies to this topic

Mr. Happy

Mr. Happy
  • Members
  • 3 posts

Posted 16 February 2006 - 08:47

Hi,

I've been searching the web/manual etc and trying for about a week now to figure out how I can remove a folder from within the MSI (by using a custom action).
The only way I figured out that works is to make a batchfile which executes
CODE
rd c:\folder-to-remove /s /q

After that I create a zip containing the batchfile, transform that zip into a sfx.
Make that sfx a silent extractor to a specific folder and let it run the batchfile contained in it.

It works, but takes a lot longer to run than just to run command straight from the dos-prompt.

Is there anyway to do this more efficient???

Btw, I'm using Installshield Adminstudio 5.02....

TIA,

Mr. Happy

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 February 2006 - 11:03

Is there are reason why you are not using the RemoveFile table in msi? A dll might work faster than a self-extracting zip tht calls a .bat that run a dos command.

Mr. Happy

Mr. Happy
  • Members
  • 3 posts

Posted 18 February 2006 - 11:35

What I understood from the documentation was that you can only remove files that were installed with the msi.

Besides that, I couldn't find a clear explanation how I should use that (or the RemoveFolder-table)...


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 February 2006 - 20:12

The RemoveFile table contains a list of files to be removed by the RemoveFiles action. Setting the FileName column of this table to Null supports the removal of empty folders.
http://msdn.microsof...efile_table.asp