[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Machine name



Steve Cavill wrote:

> You could use call system using to call the unix
> hostname command and pipe the output to a file, and
> read in the name from the file.

Steve et. al,

I'm not using UNIX, I'm running NT, but I would imagine that the logic
should be the same.  I tried using the NT Hostname command as follows:

begin-program
    let $DOS_Command = 'c:\win32\system32\hostname > c:\machine.sqr'
    call system using $DOS_Command #DOS_status
end-program

The program runs and creates an empty file called machine.sqr .  When
I run the same $DOS_Command from an NT DOS prompt it creates a small
file that contains my machine's name.  Why is the file not capturing
the machine's name when run from within SQR?

Dunc.

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com