Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: uninstall ado package


From   "Sergiy Radyakin" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: uninstall ado package
Date   Mon, 20 Oct 2008 14:37:13 -0400

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index