Page 1 of 1
Computer/Workstation name
Posted: Sat Dec 06, 2008 11:00 pm
by cdmmaui
Is there a function available that returns the name of the computer/workstation?
Posted: Sun Dec 07, 2008 1:35 am
by Lautaro
Hello,
You can try this :
cName:=getenv("COMPUTERNAME")
this it's ok in Windows Vista Busines.
Atte.,
Lautaro Moreira
Pd. : Sorry for my bad english
Posted: Sun Dec 07, 2008 3:03 am
by Rochinha
Usas NetName() de CT.LIB tambien.
Re: Computer/Workstation name
Posted: Sun Dec 07, 2008 11:58 am
by Davide
cdmmaui wrote:Is there a function available that returns the name of the computer/workstation?
NetName() -> Computer Name
NetName(.t.) -> Logged-in User Name
Please note that on Terminal Server environments NetName() returns the Server's name, not the remote workstation's one.
Regards,
Davide
Posted: Sun Dec 07, 2008 5:21 pm
by cdmmaui
Thank You, that is what I needed
Posted: Sun Dec 07, 2008 11:17 pm
by Otto
Should this work with Habour, too.
Harbour returns:
NetName() -> Computer Name
NetName(.t.) -> not Logged-in User Name but also Computer Name
Regards,
Otto