Dear All,
I have a command that creates some files during it's work, which in
their nature are neither temporary, nor permanent. (They exist more
than one session). They are created when the program is first launched
and changed occasionally after. An example may be a config file, which
determines the mode of use of the command (in reality things are more
complicated, a dummy config file could be simply supplied with the
package). I don't want to leave a mess on the user's computer and when
[s]he uninstalls the package with -ado uninstall foobar- I want to
clean up and remove all of these `temporary' files.
Q: is there any way how I can provide an uninstall routine, that will
be called by Stata when the user issues -ado uninstall foobar- ? (I
prefer to avoid instructing "Don't forget that you can't remove this
package like any other package and must first call -foobar_uninst- and
then -ado uninstall foobar-).
Earlier I asked about the possibility of receiving control immediately
after the package is installed (e.g. to add a command to the menu).
This request is symmetric, but with regard to uninstallation.
Ideally, I would want to include into the package two files, e.g
foobar_on.ado and foobar_off.ado and have Stata's -ado- execute the
first after -foobar- is installed and the second before it is
uninstalled.
Thank you,
Sergiy Radyakin
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/