Computer Name

How to get the name of the computer accessing the application? I mean
the computer the user use to access the application.

Thanks,

Lantis.

“Lantis” == Lantis S. [email protected] writes:

How to get the name of the computer accessing the application? I mean
the computer the user use to access the application.

Generally speaking you don’t, because there is no such thing as the
name of a computer. What are you really after?

	     Calle D. <[email protected]>
	 http://www.livejournal.com/users/cdybedahl/
   "Facts are for people with weak opinions." -- Lars Willför, I]M

Calle D. wrote:

“Lantis” == Lantis S. [email protected] writes:

How to get the name of the computer accessing the application? I mean
the computer the user use to access the application.

Generally speaking you don’t, because there is no such thing as the
name of a computer. What are you really after?

       Calle D. <[email protected]>
   http://www.livejournal.com/users/cdybedahl/
   "Facts are for people with weak opinions." -- Lars Willf�r, I]M

I am developing some sort of web-based problem reporting system. If
someone has a problem with a software, he will log on to the system and
reports the problem. I want the system to get the computer name used to
log the problem. In windows, right click my computer and click the
computer name tab. The computer name i want to get is the full computer
name; in my case is lantis-same.

Thanks,

Lantis.

I forgot to add that the system is going to be used in windows
environment only.

Lantis.

Recording the ip address of the computer the request is coming from
should be sufficient, provided they are fixed IP addresses.

On Monday, April 10, 2006, at 4:50 PM, Harm de Laat wrote:

Lantis.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

_Kevin

I don’t think you can do this.
It might be possible by using some VBScript / ActiveX component.
However,
this would require the user to allow Active X components.

nbtstat -A | grep <03> | cut -f1 -d" "

if you are using windows and have grep and sed. There are windowy
ways of greping and cuting too.

From inside RoR I have to assume there is some way to execute shell
commands. It’s not pretty, but your only choice in this case I think

Alternatively, you could have a scheduled process run through all your
sessions and look up computer names in the background and update a
table in the database with them.

This is perishable data due to DHCP and user hijinx.

  • Ian

“Lantis” == Lantis S. [email protected] writes:

If someone has a problem with a software, he will log on to the
system and reports the problem. I want the system to get the
computer name used to log the problem. In windows, right click my
computer and click the computer name tab.

There is nothing in standard web communication that will give you
that. You can either log the IP adress of the incoming connection (and
its reverse DNS, if there is one), or you can start investigating
Windows-specific solutions.

	     Calle D. <[email protected]>
	 http://www.livejournal.com/users/cdybedahl/

“Do any churches offer gluten-free body of christ? Just in case some
of
their flock have problems digesting their saviour?” – Rob Blake,
BofhNet

I’ll give it a shot. Thanks for the help.