Hi

if you execute net start
you get a list of all active services,
so it means searching through this list
dos command search

http://www.computerhope.com/findhlp.htm


with kind regards
Ruben Willems


On Tue, Apr 7, 2009 at 10:30 PM, rbr <[email protected]> wrote:

>
> Excellent! Seems obvious now. thank you!
>
> One more question. Can you check to see if the service is started
> before running the NET START? Or can you handle the failure?
>
> rbr
>
> On Apr 7, 12:34 pm, Ruben Willems <[email protected]> wrote:
> > Hi
> >
> > you made a small mistake
> > it should be :
> >
> >     <exec>
> >        <executable>c:\Windows\System32\cmd.exe </executable>
> >        <buildArgs>/C NET STOP "Service name"</buildArgs>    </exec>
> >
> > with kind regards
> > Ruben Willems
> >
> > On Tue, Apr 7, 2009 at 5:57 PM, rbr <[email protected]> wrote:
> >
> > > Ruben,
> >
> > > It's best that I don't post my entire config file. However, here is
> > > the tasks section (with some privacy editing). Hope this helps.
> >
> > >    <tasks>
> > >                <exec>
> > >                        <executable>c:\Windows\System32\cmd.exe
> > > /C</executable>
> > >                        <buildArgs>NET STOP "Service name"</buildArgs>
> > >                </exec>
> > >      <msbuild>
> > >        <executable>C:\WINDOWS\Microsoft.NET\Framework
> > > \v3.5\MSBuild.exe</executable>
> > >        <projectFile>...</projectFile>
> > >        <buildArgs>/noconsolelogger /verbosity:normal</buildArgs>
> > >        <targets>Compile</targets>
> > >        <timeout>600</timeout>
> > >        <logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,...</
> > > logger>
> > >      </msbuild>
> > >          <exec>
> > >                <executable>c:\Windows\System32\cmd.exe /c</executable>
> > >                <buildArgs>NET START  "Service name"</buildArgs>
> > >    </exec>
> > >    </tasks>
> >
> > > On Apr 7, 12:11 am, Ruben Willems <[email protected]> wrote:
> > > > Hi
> >
> > > > can you post your ccnet.config
> > > > or at least the project
> >
> > > > with kind regards
> > > > Ruben Willems
> >
> > > > On Tue, Apr 7, 2009 at 12:31 AM, rbr <[email protected]> wrote:
> >
> > > > > No, I am trying to start and stop a service of ours. However, when
> I
> > > > > put the exec tasks in to the config, the ccnet service cannot be
> > > > > started.
> >
> > > > > Does that make sense? Sorry if this is confusing.
> >
> > > > > rbr
> >
> > > > > On Apr 6, 4:02 pm, Ruben Willems <[email protected]> wrote:
> > > > > > hi
> >
> > > > > > are you trying to stop and start ccnet from within ccnet?
> >
> > > > > > with kind regards
> > > > > > Ruben Willems
> >
> > > > > > On Mon, Apr 6, 2009 at 11:14 PM, rbr <[email protected]>
> wrote:
> >
> > > > > > > Thank you Hans. Unfortunately, in my environment, it is not a
> > > trivial
> > > > > > > matter to get approval to add a new tool like NAnt. I am
> working on
> > > it
> > > > > > > however.
> >
> > > > > > > Ruben, I tried following the directions in this link and
> received
> > > an
> > > > > > > error where the CC service would not start with these commands
> in
> > > > > > > there. These are supposed to reside within the Tasks section
> > > correct?
> >
> > > > > > > Best,
> >
> > > > > > > rbr
> >
> > > > > > > On Apr 3, 12:43 pm, Hans Van Eylen <[email protected]> wrote:
> > > > > > > > Hi,
> > > > > > > > you could use a NAnt task in CCNet. Basically you call a NAnt
> > > build
> > > > > file
> > > > > > > > which uses the servicecontroller task to stop/start services
> on
> > > local
> > > > > or
> > > > > > > > remote machines :
> >
> > >http://nant.sourceforge.net/release/latest/help/tasks/servicecontroll.
> > > > > ..
> >
> > > > > > > > Hans
> >
> > > > > > > > 2009/4/3 rbr <[email protected]>
> >
> > > > > > > > > Hello,
> >
> > > > > > > > > I am fairly new to cruise control and am trying to find a
> way
> > > to
> > > > > stop
> > > > > > > > > a service prior to my triggered MSBuild task and re-start
> it
> > > after
> > > > > the
> > > > > > > > > build is complete. I know this can be done in MSBuild.
> However,
> > > the
> > > > > > > > > MSBuild is shared accross environments that do not all want
> > > this
> > > > > > > > > behavior implemented. So, I would like to be able to add it
> to
> > > the
> > > > > > > > > CCNet.config file. I tried adding  NET STOP and NET START
> > > commands
> > > > > in
> > > > > > > > > the tasks section. But this apparently does not work. At
> least
> > > not
> > > > > the
> > > > > > > > > way I did it.
> >
> > > > > > > > > Thanks in advance.
> >
> > > > > > > > > rbr
>

Reply via email to