Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Monitor and Restart a System Service

Posted on 2007-10-18
7
Medium Priority
?
227 Views
Last Modified: 2013-11-14
G'Day,
  We have a client site running Server 2003.  They have a backup tape that should be running every night.  The "Removable Storage" service crashes on a regular basis and despite setting it to auto restart when it crashes, it just marks itself as 'Disabled'.  Once this happens, the backups stop (not surprisingly).

The event logs don't even seem to record anything related to this service stopping, trying to restart or anything so there is no indication of the cause.  We've even replaced the tape drive with another model and changed backup programs (not wholly due to this issue though).

Is there some way to monitor if the service is running, and if isn't, mark it as 'Automatic' and restart it?  It doesn't appear in the task list...

Thanks
0
Comment
Question by:comptech_engineering
  • 3
  • 2
  • 2
7 Comments
 
LVL 22

Expert Comment

by:dan_blagut
ID: 20107188
Hi
You can do an VBScript that use net start command to check if the service is running or not. The for starting the service you can use again this command "net start service_name". For changing the status to automatic you can import a specific key in registry using the same VBScript.
If you need help on programming the script let me know.

Dan
0
 
LVL 86

Expert Comment

by:oBdA
ID: 20107353
A service doesn't set itself to disabled. Check if there's a GPO disabling this service.
On the server, open a command prompt and enter
gpresult /target computer /v >gpresult.txt
which will create a file "gpresult.txt" in the current folder.
Open this file in Notepad or whatever, and check the section System Services for disabled services (the removable storage service is probably "NtmsSvc".
0
 
LVL 1

Author Comment

by:comptech_engineering
ID: 20145342
G'Day,
  I have run the GPRESULT command and there is nothing in the "System Services" section at all, so it's not a Group Policy.

And unfortunately, the NET START command will not work if the service is disabled.  I would need to re-enable it first, also through a script and that is far beyond my programming capapbility!

Cheers
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Accepted Solution

by:
dan_blagut earned 1500 total points
ID: 20145717
Hi
If you open regedit and go to HKLM\System\CurrentControlSet\Service you can find Removable Storage storage aka NtmsSvc. The you check that your service is on Automatic (the value for start is 2) and perform an save for NtmsSvc in a file (rigth click on NtmsSvc, Export). Save the file under C:\ with the name RemStorAuto.reg
Then you will use the following script:

@echo off
regedit.exe /s c:\RemStorAuto.reg
net start NtmsSvc


That is all
Good luck

Dan
0
 
LVL 86

Expert Comment

by:oBdA
ID: 20154187
On server 2003, you can use the following command line to set the start type of the service:
sc config ntmssvc start= auto
(note the space after the "="; use "start= demand" for manual start).
0
 
LVL 22

Assisted Solution

by:dan_blagut
dan_blagut earned 1500 total points
ID: 20154193
Thanks oBdA, then the script becames

@echo off
sc config ntmssvc start= auto
net start NtmsSvc

Dan
0
 
LVL 1

Author Closing Comment

by:comptech_engineering
ID: 31408233
A little tweaking was required for this site, but for anybody else who has simialr issues, this should get them going again.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

580 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