Important alert: (current site time 7/15/2013 11:57:04 PM EDT)
 

winzip icon

View/Start/Stop WinNT/Win2000 Services

Email
Submitted on: 11/3/2000 3:59:25 AM
By: Chris Register 
Level: Intermediate
User Rating: By 7 Users
Compatibility: ASP (Active Server Pages), HTML
Views: 40545
(About the author)
 
     Allows Administrator or 'Administrators' group users to start and stop services from a web interface. Also allows viewing of a subset of services (options are All/Starting/Started/Stopping/Stopped).

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' for :View/Start/Stop WinNT/Win2000 Services
'**************************************
This code is free for commercial and non commercial use. You may use it without paying 
royalties to the author.
The Author assumes NO responsability for any damages this application may cause to your system.
This product is released "AS IS" with no warranties at all.
You are free to distribute it as you wish.
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

11/28/2000 7:12:21 AMLuke

excellent idea for server administration if you dont want to go or cant go always to your server.

i wish there would be more of such codes for dns or dhcp configuration
(If this comment was disrespectful, please report it.)

 
10/10/2001 5:23:13 AMM Fernandes

I am trying to use this code on Win 2000 and gives the Set error as said, do i have to install windows 2000 resource kit as said in the help of win 2000 for it to work
(If this comment was disrespectful, please report it.)

 
10/10/2001 6:01:39 AMChris Register

Win2K comes with ADSI, and should not require any special installs to use the above scripts. I run these scripts on 2 Win2K *Professional* machines, and it works fine.

I'm not sure what the problem can be ... please feel free to email me with more information at if you continue to have problems.

(If this comment was disrespectful, please report it.)

 
3/31/2002 12:20:55 PMchuck

I got it to semi wirk with Windows NT. However, I am logged on as administrator and I am getting the error where everything it stopping... Any ideas?
(If this comment was disrespectful, please report it.)

 
3/31/2002 12:22:19 PMChuck

Scratch that...I was using the I_USR, thought I had Anon access off. Thanks
(If this comment was disrespectful, please report it.)

 
4/24/2002 5:01:11 AMMike

Very cool. Since you got a grasp on ADSI, then if you get some free time, how about seeing if you can come up with adding virtual directories or websites in IIS. Or removing the Anonymous box under Directory security would be appreciated too.
(If this comment was disrespectful, please report it.)

 
4/24/2002 9:32:46 AMChris Register

Okay, when I have a few minutes ... should be around June of 2004 ...

Seriously though, not bad ideas!

Regards,


Chris Register

(If this comment was disrespectful, please report it.)

 
4/26/2002 12:01:58 PMChris Register

I have updated the scripts so that now you can manage any NT computer (NT4 server/workstation, Win2K (all), WinXP (all) ) using the script. It now also displays all of the computers in the domain and allows you to choose the one you want to maintain.

Email me if you want the new version!
(If this comment was disrespectful, please report it.)

 
5/24/2002 12:56:34 PMThass

This is what i have been looking for, for a long time. But i get the same error, as i get when i try to this with some other code i found.
The error is :error '80070035' when i try using displayservices.asp.

When using validate.asp the AUTH_USER variable is emty, and validation is denied.

Could this be becuse my sever is not in a domain, but is a standalone webserver ?

Any help will be appreciated



(If this comment was disrespectful, please report it.)

 
5/29/2002 8:59:23 AMrichard davies

I can only get this code to show services on the actual webserver - not on any other machines in the domain...?

I'm pretty sure it's not the actual code, because this code also only works on the webserver:

<%@ Language=VBScript%>

<%
Set adsNS = GetObject(
(If this comment was disrespectful, please report it.)

 
9/18/2002 10:32:16 AM

If anyone has the new version, can they please email it me at jpearson@bfwpub.com , the author is not responding to emails for it.
(If this comment was disrespectful, please report it.)

 
10/14/2002 10:20:54 AMEric Ross (*)

This is perfect!
(If this comment was disrespectful, please report it.)

 
3/4/2003 5:21:09 AM

Standalone iis-server says:
error '80070034'
/it/test/displayservices.asp, line 84

Any idea?
(If this comment was disrespectful, please report it.)

 
3/24/2003 8:19:13 PM

Hi

I'm looking for a script that will monitor the Win2k service, like I can check IIS ADMIN Service is running and it will return 1 and if not running it will return 0. Can you or anyone else help me where can I find such a resource or script.
Please email me at deann@speedscan.com

Regards
dean
(If this comment was disrespectful, please report it.)

 
8/3/2003 11:17:34 AM

I am also getting this error and I have specified my domain id for the site to run under without annon.
Any ideas anyone anyone buellar buellar
(If this comment was disrespectful, please report it.)

 
8/3/2003 11:18:07 AM

Oops forgot the error
error '80070034'
(If this comment was disrespectful, please report it.)

 
8/31/2003 5:10:42 PM

Try
WinNT://mydomainorworkgroup/mycomputer, computer
(If this comment was disrespectful, please report it.)

 
12/21/2003 10:43:50 AM

Hello
I want to configure win2000 as web server for asp plzzz tell me how do i configure it
thanx....
(If this comment was disrespectful, please report it.)

 
12/28/2004 1:49:18 AM

what if you want also to monitor services from other workstations/servers? thanks
(If this comment was disrespectful, please report it.)

 
12/28/2004 1:50:14 AM

what if you want to monitor services from other workstation?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.