Statalist


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

st: path for winexec?


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: path for winexec?
Date   Tue, 27 May 2008 18:33:17 +0200

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
translator(smcl2ps)
!ps2pdf mylog.ps
winexec "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe"
"C:/Users/`c(username)'/Desktop/mylog.pdf"
***********************

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
Germany

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/



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