PC Review


Reply
Thread Tools Rate Thread

How can I remotely stop Windows service, do some stuff, and start the remove service again.

 
 
anonieko@hotmail.com
Guest
Posts: n/a
 
      28th Oct 2005
How can I remotely stop a Windows service, do my stuff, and start the
remote service again.?

>
> You need to have a utility.
>
>


1. First download the utility psservice.exe
from pstools package of SysInternals site

Visit: http://www.sysinternals.com/Utilities/PsService.html
http://www.sysinternals.com/Utilities/PsTools.html

Run a batch file that loops until the service is stopped
do your process and start the service again



2. Assuming the naem of remote machine is MACHINE_ABC
and the windows service is MyWindowService


Here is the batch file:
-----------------------------------------------------

:start
psservice.exe \\MACHINE_ABC stop MyWindowService
if errorlevel 1 goto :start

rem -----------------------------------
rem do your stuff here
rem -----------------------------------


if errorlevel 1 goto :start
:restart
psservice.exe \\MACHINE_ABC start MyWindowService
if errorlevel 1 goto :restart

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
start a windows service remotely graphicsxp Microsoft VB .NET 4 1st Nov 2006 05:27 PM
Start/stop Service remotely by non Admin User on Windows 2000 server PCSupport Microsoft Windows 2000 Networking 1 28th Dec 2005 11:34 PM
Windows Service - Windows application - Start/Stop Service Murali Microsoft C# .NET 1 22nd Apr 2005 12:49 PM
Allow normal user to start/stop service remotely 3c273 Microsoft Windows 2000 Networking 1 9th Aug 2003 04:09 AM
How do I remove all the ati service stuff? Dodgy ATI Video Cards 2 23rd Jul 2003 08:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.