|
From: Jim I. <ir...@um...> - 2010-01-01 19:14:26
|
Thanks to both of you. I was unaware of the SC command. I'll check it out Monday when I go back to the office. - Jim Irrer On Fri, Jan 1, 2010 at 12:32 PM, Leif Mortenson <le...@ta...>wrote: > Jim, > As Javier mentioned, it is possible to execute a command from within > Java. I was not sure exactly from where you wanted to stop the > service. > > If the service is a Wrapper service, you can use "wrapper.exe -p > wrapper.conf" to stop the service. > You can also use "SC ..." or "NET STOP ..." from the command line. > >From Java it is also possible to call > WrapperManager.sendServiceControlCode(..., > WrapperManager.SERVICE_CONTROL_CODE_STOP). > > In all cases, you will need to make sure that the calling process has > permission to control other services. On Windows Vista, 2008 and 7, > you will need to run from an elevated console or process. > > Cheers, > Leif > > On Wed, Dec 30, 2009 at 7:35 AM, Jim Irrer <ir...@um...> wrote: > > Hi - > > > > If I have a service running, is it possible to invoke another > > program to stop it? (as opposed to using the "Services" > > dialog in Windows). > > > > I want this so that when our group re-installs services > > the old ones can be shut down automatically. It would also > > be nice if anyone knows of a way to run a program to tell > > Windows to start a service. > > > > Thanks for any info, > > > > - Jim > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |