Displaying computername in a browser?

I have an intranet start page that everyone in the company jumps into whenever they login
Currently, it displays via Javascript the time/date and the IP of the PC.

I was hoping to find a way to also display the computername right below the IP.
I plan on doing a full scale inventory of my PCs and having this available will help me alot as I can have some people self-inventory their PCs by email.

My IP one looks like this:
</script><br>

<font size="1" face="Arial">IP - <!--#include virtual="/bin/ipaddr.pl"--> </font></center>  
  <script>

I was hoping for something just as easy
jskewesAsked:
Who is Participating?
 
rockymageeCommented:
You have to use client side scripting (ASP,PHP,etc...) to retrieve the computer name.

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20580517.html?query=get+computer+name&topics=87
0
 
rockymageeCommented:
In ASP:

<%
Set WshNetwork = server.CreateObject("WScript.Network")
IntMachinName=WshNetwork.ComputerName
Response.write IntMachinName
%>
0
 
jskewesAuthor Commented:
is that just something I can add to an SHTML page?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
rockymageeCommented:
If you are running IIS then just save that code in a page called something like compName.asp.

Then include that file in your .shtml.  I think it should work.

Otherwise, you may have to change your IIS settings to see .shtml files as .asp files.
0
 
JoeCommented:
I know of some free open source software to do Software and Hardware inventory remotley logged into an admin account. We use it here and it works great, all you do is execute the script and it will query your network for all the machines and give the system specs, Windows version, software installed, hardware, gives you lots of other options too. Let me know if this software would interest you and I will post it.

Joe
0
 
jskewesAuthor Commented:
I don't think I have IIS running on my intranet webpage server.
I'd rather use some sort of javascript.pl
0
 
rockymageeCommented:
oops!  I meant <b>server</b> side (ASP, PHP, etc...)
0
 
arthurjbCommented:
You should post the contents of the /bin/ipaddr.pl  since it is a script that is running on the server.

If your hosts names are in dns, you could add a line to the script to do a reverse nslookup on the ip addresses which would supply the hostname.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.