Solved

Calculate server uptime

Posted on 2000-03-08
5
917 Views
Last Modified: 2008-01-09
Hi, On my site running on a windows NT server with IIS I want to display the server uptime in day's:hours:mins

Does anyone know how I can accomplish that ??

Thanks
0
Comment
Question by:boret
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
CoolAss earned 200 total points
ID: 2598452
You need the WinNT option pack which includes a utility called uptime.exe. This returns the information you want.

You then need to place that utility (which is normally placed in the system32 directory to which the IIS account doesn't have access to) into a directory which the IIS account has been given permissions.

Now use a program like ASPExec or a custom COM object to call the application and then parse the results to display on the page. ASPExec is free, and can be downloaded here:

http://www.serverobjects.com/comp/Aspexec.zip 

Hope that helps. Please post comments if you need clarifacation before you decide to decline my answer if the case may be.

0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2598457
By the way, ASPExec is a COM object itself, and needs to be registered with regsrv32.exe before you can use a Server.CreateObject to put it on an ASP.
0
 

Author Comment

by:boret
ID: 2604309
Hi, I have the optionpach but I can't find the utility uptime.exe, Can you tell me where I can find it. I downloade the ASPExec and I think (hope) that it wil work if I have uptime.exe
0
 
LVL 4

Expert Comment

by:CoolAss
ID: 2605995
It's not the option pack... it's the NT Resource Kit.

www.microsoft.com

I am farely sure it's free... if not, i can provide you with a link to download uptime.exe, after all, that's a free program.
0
 

Author Comment

by:boret
ID: 2611437
Hi CoolAss, UPTIME.EXE is neither in the option pack or in the Resource kit version that I have but I did found it on microsoft.com as you suggested and it works (Though not as good as in the good old Novell days :) )

Anyway, the combination with ASPExec works super so thank you for the advice.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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