login about faq

Converting some of our code to use your zip component. Is there any way to have the self-extracting executable clean up the AutoTemp directory when the AutoRun exe exits?

Ideally, when our program finishes, the temp directory and all files created in it by the self-extractor would be deleted.

asked Nov 14 '12 at 18:44

chilkat's gravatar image

chilkat ♦♦

(The Chilkat Self-Extracting EXE functionality in the Chilkat Zip class/component only applies to Windows systems.)

The AutoTemp property, if set to true, tells the self-extractor to automatically choose a temp directory for extraction. It only makes sense to use AutoTemp with AutoRun, which tells the self-extractor which EXE after extraction is to be run as the "setup program". (Otherwise, what would be the point of simply extracting files in some unknown temp directory and leaving them there?)

OK.. now to answer the question.

At a certain point in the history of Chilkat Zip, more and more self-extracting properties were needing to be added, and it became apparent that adding individual properties was not a good way to go. The zip.ExeXmlConfig property is an XML string that contains all of the self-extracting EXE related properties. For example, if you set the AutoTemp property = true, you'll find that an "AutoRun" XML node gets added to the ExeXmlConfig property. There are many features that can be specified via the ExeXmlConfig but don't have a getter/setter property in the API. The "Cleanup" property is an example.

Your program can indicate that it wants auto-cleanup of temp files by adding a "<Cleanup>1</Cleanup>" node to the ExeXmlConfig.

Unfortunately, there are still some features that are not yet documented...


answered Nov 14 '12 at 19:16

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 14 '12 at 18:44

Seen: 3,214 times

Last updated: Nov 14 '12 at 19:16

powered by OSQA