FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Computer/Workstation name
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Computer/Workstation name
Posted: Sat Dec 06, 2008 11:00 PM

Is there a function available that returns the name of the computer/workstation?

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 337
Joined: Fri Oct 07, 2005 02:44 PM
Computer/Workstation name
Posted: Sun Dec 07, 2008 01:35 AM

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

Hola,

Soy un Contador que por necesidad aprendio a programar y se quedo programando.
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
Computer/Workstation name
Posted: Sun Dec 07, 2008 03:03 AM

Usas NetName() de CT.LIB tambien.

Posts: 190
Joined: Tue Mar 14, 2006 01:59 AM
Re: Computer/Workstation name
Posted: Sun Dec 07, 2008 11:58 AM
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
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Computer/Workstation name
Posted: Sun Dec 07, 2008 05:21 PM

Thank You, that is what I needed

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Computer/Workstation name
Posted: Sun Dec 07, 2008 11:17 PM

Should this work with Habour, too.
Harbour returns:
NetName() -> Computer Name
NetName(.t.) -> not Logged-in User Name but also Computer Name

Regards,
Otto

Continue the discussion