I would do something like this:
tempfile osresults
! ipconfig > "`osresults'"
! ver >> "`osresults'"
type "`osresults'"
The " " are protection against spaces in your filepath. You
might not need them, but they do no harm.
In general, be aware also of stuff shown by -creturn list-.
Nick
[email protected]
[email protected] sent this (twice!)
I'm trying to write a .do file that "validates" the version of Stata on my
computer. Basically I'm using the do files that Stata provides which
assesses it's accuracy on NIST datasets for which certified results are
available (http://www.stata.com/support/cert/nist/
<http://www.stata.com/support/cert/nist/> ). I have a master do file which
first opens a log file before calling these do files in sequence.
I would also like this master do file to have commands that insert into the
same log file, the current date, current Stata version, current Windows
operating system used, and unique computer ID (I think I can use the IP
address for this). With these commands I can prove the tests apply to my
current complete settings. I do not know any commands in Stata that show the
current Windows operating system or the unique computer ID such that the
results can be easily saved in a log file. Can anyone please help?
I know I can use the SHELL command to access DOS commands that display this
information - ver and ipconfig, but I can't figure out how to incorporate
the results into the log file.
*
* 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/