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

Re: st: Inserting Windows Version and IP address into a log filefrom wit

From   n j cox <>
Subject   Re: st: Inserting Windows Version and IP address into a log filefrom wit
Date   Wed, 04 Jul 2007 15:38:43 +0100

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 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 (
<> ). 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:

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