System name (network)

BlitzPlus Forums/BlitzPlus Programming/System name (network)

FirstTheIdea(Posted 2003) [#1]
Is there any way of find out what an

1) Domain
2) User name
3) Computer name

is?


semar(Posted 2003) [#2]
You may use the GetEnv command to retrieve any environment variable value you need.

For your question, you could use:
domain$ = GetEnv$("USERDOMAIN")
username$ = GetEnv$("USERNAME")
compname$ = GetEnv$("COMPUTERNAME")

More info at the online manual:
http://www.blitzbasic.com/bpdocs/command.php?name=GetEnv&ref=2d_cat

Did it help ?

Sergio.


FirstTheIdea(Posted 2003) [#3]
Yes it is. I knew it would be simple but not that simple.

PS, I have been trying to download So To Speak but it will not download. Is there an problem with web page?


semar(Posted 2003) [#4]
I have been trying to download So To Speak but it will not download


You can download it from my new website:

http://semar.50free.org/home/main.html

Feedback are wellcome.

Sergio.


jfk EO-11110(Posted 2003) [#5]
GetEnv$ with these Eviromentvariables might work on some Computers, on some it don't. On the one I am useing ATM it doesn't work.


Orca(Posted 2003) [#6]
Doesnt work here either :(


FlameDuck(Posted 2003) [#7]
Doesnt work here either :(
Because you're using a sucky Windows. One that is not designed for such fancy things as networking. You'll find that an upgrade to Windows NT3.51 or better (that's NT4, 2000 or XP) will solve your problems.


Todd(Posted 2003) [#8]
GetComputerNameEx might work for you. Go here for the MSDN article on it. I don't think that you can get the user name with it, but I know there's a function for that too, though I can't remember what it is.