cancel
Showing results for 
Search instead for 
Did you mean: 
epository
Level 10

EEDK 9.4 - Batch File to Restart RSD Sensor Service

I want to create a package that I can push out to the RSD sensors on my network via Client Task to get the rssensor service to restart daily.

So, i created the .bat below and then put in nonsense registry keys so that it would run daily.  Created the package and checked it in and created a Product Deployment Task to run against tagged computers.

I have been testing it on my own computer, but it is failing.....any ideas?

pushd "%~dp0"

net stop rssensor

timeout /t 30

net start rssensor

exit

restartrssensor.bat

My agent log contains this:

2014-06-13 15:55:46    I    #1644    Uec    Terminating thread

2014-06-13 15:55:46    I    #2668    LPC    Unregistering LPC process

2014-06-13 15:55:46    I    #2668    LPC    Successfully unregistered LPC process, CMNUPD__3000Smiley Very HappyEFAULT:3788

2014-06-13 15:55:46    I    #5644    Uec    Terminating ipc channel

2014-06-13 15:55:46    I    #5644    ipcchannel    Aborting IPC object connection

2014-06-13 15:55:46    I    #5644    ipcchannel    Closing IPC connection

2014-06-13 15:55:46    I    #5644    ipcchannel    Closing IPC server

2014-06-13 15:55:58    I    #3284    Sched    The task  Restart RSD Sensor has failed

2014-06-13 15:55:58    I    #3284    Sched    The task  Restart RSD Sensor has failed

2014-06-13 15:55:58    I    #3284    Sched    >>--ReleaseTask

2014-06-13 15:55:58    I    #3284    Manage    Releasing Task Cookie=5758224

2014-06-13 15:55:58    I    #3284    Sched    <<--ReleaseTask

2014-06-13 15:55:58    I    #3528    Agent    RunNow task Restart RSD Sensor is failed

2014-06-13 15:55:58    I    #3528    Agent    RunNow task Restart RSD Sensor is finished

2014-06-13 15:55:58    I    #3492    Agent    Agent Data Channel work wakeup, processing items

2014-06-13 15:55:58    I    #3528    Sched    >>--CSchedule:Smiley Very HappyeleteTask

2014-06-13 15:56:00    I    #3428    Agent    Started processing a package..

2014-06-13 15:56:00    i    #3492    Agent    Sending the next batch of 1 data channel items

2014-06-13 15:56:00    I    #3428    SpiPkgr    Using sequence number 8530

2014-06-13 15:56:00    i    #3428    Agent    Agent communication session started

2014-06-13 15:56:00    I    #3428    Agent    Package type is MsgUpload

2014-06-13 15:56:00    i    #3428    Agent    Agent is connecting to ePO server

2014-06-13 15:56:00    I    #3428    imutils    Trying with site: 192.768.0.45:80

2014-06-13 15:56:00    I    #3428    naInet    HTTP Session initialized

2014-06-13 15:56:00    I    #3428    imsite        Upload from: C:\ProgramData\McAfee\Common Framework\Unpack\pkg00130471377603210000_4003897587.spkg

2014-06-13 15:56:00    I    #3428    imsite        Upload response target: C:\ProgramData\McAfee\Common Framework\Unpack\pkg00130471377603270000_3682740536.spkg

2014-06-13 15:56:00    I    #3428    imsite    NaInet library returned code == 13

2014-06-13 15:56:00    I    #3428    naInet    HTTP Session closed

2014-06-13 15:56:00    i    #3428    Agent    No package received from ePO Server

2014-06-13 15:56:00    i    #3428    Agent    Agent communication session closed

2014-06-13 15:56:13    i    #3284    Sched    The task Restart RSD Sensor is deleted (ID={C32254E1-6551-4AFC-BE3B-6F2E5C936CB4})

Message was edited by: epository on 6/13/14 9:25:01 AM CDT

Message was edited by: epository on 6/13/14 9:25:34 AM CDT
0 Kudos
1 Reply
spederse
Level 8

Re: EEDK 9.4 - Batch File to Restart RSD Sensor Service

Maybe try with

%COMSPEC% /C

in front of your lines

%COMSPEC% /C net stop rssensor

%COMSPEC% /C timeout /t 30

%COMSPEC% /C net start rssensor

Have you tested this local running CMD as a SYSTEM account?

Download PSEXEC.exe from systinternals and open a system prompt:   psexec.exe /s /i cmd.exe    the DOS prompt that opens runs as local system (try the whoami command). That way you can really test what happens when you run it as local system.

0 Kudos