[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: path for winexec?
Jeph Herrin <email@example.com>
Re: st: path for winexec?
Tue, 27 May 2008 12:59:12 -0400
winexec uses the Windows PATH environmental variable to determine
where to look for executables. Some programs add their location
to the PATH when they are installed; I see on my computer that
Miktex did so, and that Adobe did not.
To check the path, open a command prompt and type -path-.
The PATH is a semicolon seperated list of folders; you can add
more folders to it, but there is a length limit.
You can add to the PATH variable at the command prompt with
PATH = "$PATH; M:\y New\Path"
but it only sticks around for that session. To add a folder
permanently, go to the control panel->System->Advanced. At
the bottom you'll see a button for the environmental variables;
click that, and in the bottom window fo the dialog that opens
you'll see, among others, PATH. You can edit that here.
Martin Weiss wrote:
> Dear Statalisters,
> I am wondering whether there is a way to make Stata find executables on its
> own. I usually have a smcl-log running and sometimes like to turn it into a
> pdf (on a Windows machine). So I have it translated to ps and then let Stata
> -winexec- the ps2pdf from the Miktex distribution. After conversion, I want
> the file to be displayed automatically, so the code looks like this:
> -my commands-
> log close
> translate "mylog.smcl" "C:/Users/`c(username)'/Desktop/mylog.ps", replace
> !ps2pdf mylog.ps
> winexec "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
> I have generalized the file to run on different machines without a
> requirement for any tweaking. The only missing link is the path to the
> reader exe in the last line. I am wondering why Stata is able to find the
> ps2pdf exe but not the reader. Is there a way to have it do that as well? I
> thought about putting it into the profile.do, but that would merely shift
> the onus to the profile without solving the problem...
> Any ideas?
> Martin Weiss
> Diplom-Kaufmann Martin Weiss
> Mohlstrasse 36
> Room 415
> 72074 Tuebingen
> Fon: 0049-7071-2978184
> Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130
> Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131
> SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945
> * 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: