Computer/Workstation name

Computer/Workstation name

Postby cdmmaui » 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
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Lautaro » Sun Dec 07, 2008 1: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
User avatar
Lautaro
 
Posts: 322
Joined: Fri Oct 07, 2005 2:44 pm
Location: Osorno, Chile

Postby Rochinha » Sun Dec 07, 2008 3:03 am

Usas NetName() de CT.LIB tambien.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Re: Computer/Workstation name

Postby Davide » 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
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby cdmmaui » Sun Dec 07, 2008 5:21 pm

Thank You, that is what I needed
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Otto » 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
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 111 guests