Computer/Workstation name

Post Reply
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Computer/Workstation name

Post by cdmmaui »

Is there a function available that returns the name of the computer/workstation?
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
Lautaro
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile
Contact:

Post 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
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Usas NetName() de CT.LIB tambien.
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: Computer/Workstation name

Post 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
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Post by cdmmaui »

Thank You, that is what I needed
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
Post Reply