Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retriving computer name and user name
Message
 
To
06/05/1999 14:43:59
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00215819
Message ID:
00215827
Views:
25
There are two ways and the way to get may be OS dependent:

1.) In NT, two environment variable are set by default:
USERNAME and COMPUTERNAME
Which can be retrieved with GETENV() function

2.) SYS(0)

I like number 1 because I can use it with any OS, but for non NT machines, I have to make sure that the COMPUTERNAME variable is set on each machine and that a server login script is run to set USERNAME

I like #2 because it's simple, but I'm not sure if the result it gives is OS dependent
I try to stay online, to get better information.
I try to get away from the office once in a while..
But they KEEP... PULLING.. ME.. BACK.. IN!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform