Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Displaying computername in a browser?

Posted on 2006-04-20
8
Medium Priority
?
327 Views
Last Modified: 2012-06-22
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
0
Comment
Question by:jskewes
8 Comments
 
LVL 6

Expert Comment

by:rockymagee
ID: 16498777
In ASP:

<%
Set WshNetwork = server.CreateObject("WScript.Network")
IntMachinName=WshNetwork.ComputerName
Response.write IntMachinName
%>
0
 

Author Comment

by:jskewes
ID: 16498819
is that just something I can add to an SHTML page?
0
 
LVL 6

Expert Comment

by:rockymagee
ID: 16498943
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 16

Expert Comment

by:Joe
ID: 16498965
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
 

Author Comment

by:jskewes
ID: 16498990
I don't think I have IIS running on my intranet webpage server.
I'd rather use some sort of javascript.pl
0
 
LVL 6

Accepted Solution

by:
rockymagee earned 1500 total points
ID: 16499407
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
 
LVL 6

Expert Comment

by:rockymagee
ID: 16499485
oops!  I meant <b>server</b> side (ASP, PHP, etc...)
0
 
LVL 14

Expert Comment

by:arthurjb
ID: 16504272
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month21 days, 7 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question