Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: profile.do can not be found


From   "Sergiy Radyakin" <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: profile.do can not be found
Date   Tue, 21 Aug 2007 14:50:35 -0400

Dear Alan,

thank you for your confirmation of a bug. Could you please advise on
how can I add an item to the menu automatically after a package is
installed without having a user to run an ado file first? I planned to
deliver a profile.do file which will add an item the next time Stata
is launched.

But this seems to be a bad idea because:
1. this file might already exist
2. there might be a profile.do superior in the priority list (see manual)
3. Stata must be restarted

Is there any way I can get control immediately after a package is
installed? (say, if a package contains autorun.do, it is run
immediately after installation of the package).
I realize that this might be a security risk (we don't want to see any
Stata viruses soon...).

Alternatively, would it be possible to add a keyword "m" to the
package file syntax for "Menu item", e.g.:
m "stUser" "Descriptive" "Descriptive Command" "descrcom"
might create "Descriptive" as a submenu of the "User" menu (if not
created already) and add a call to descrcom.ado labelled "Descriptive
Command"

Thank you, Sergiy Radyakin


On 8/21/07, Alan Riley <ariley@stata.com> wrote:
> Sergiy Radyakin <serjradyakin@gmail.com> reported that Stata did
> not find his profile.do file in the 'p' subdirectory of the
> PLUS (c:\ado\plus) directory on his adopath:
>
> > The manual says:
> >
> > ----- quote -------------------------------------------
> >  Stata looks for the file profile.do when it is invoked, and if it
> > finds it, executes the commands in it.  Stata looks (1) in the
> > directory where Stata was installed, (2) in the current directory,
> > (3) along your PATH, (4) in your home directory as defined by Windows'
> > USERPROFILE environment  variable, and finally (5) along the adopath
> > (see adopath).
> > ----- end quote -------------------------------------------
> >
> > I have placed profile.do in "c:\ado\plus/p/" and it does not run. It
> > is seen by -findfile- correctly. It runs if I save it to
> > "c:\ado\plus/". Why doesn't Stata run it from "c:\ado\plus/p/" even
> > though it can see it there?
>
> Sergiy has found a bug and reported a quick workaround for it.
> Stata does not currently look in the 'p' subdirectory for profile.do
> as it searches across the adopath.  The workaround is to do as Sergiy
> did and place profile.do in one of the main directories on the adopath.
> We will fix this in a future update.
>
>
> --Alan
> (ariley@stata.com)
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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