|
From: Javier S. R. <jse...@cs...> - 2009-12-31 10:19:39
|
<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><div> Jim:<br><br>It's possible (only for windows) and executing it from a user with permission to do it<br>this java sentence will work: <br><br><span style="font-weight: bold; font-style: italic;">Runtime.getRuntime().exec("SC host servicename stop")</span><br><br>host is the machine where the service is installed (it works from other machine)<br><br>for details on parameters (restart,stop status...) open a ms-dos windows and write sc ?<br clear="all"><br><br><br>I hope this helps<br><br></div><div>JAVIER SEVILLA RAMAL<br>Content Management Consultant<br>CSC<br><br>Agustín de Foxá 27 - 3º Planta, 28036 Madrid<br>C&SI | t : +34 91 3237453 | f: +34 91 3237254 | m: +34 639 146571 | <a href="mailto:jse...@cs...">jse...@cs...</a><br><a href="http://www.csc.com">www.csc.com</a><br><br><br><span style="font-size: 10px;"></span><div><br></div><font color="#990099">-----Jim Irrer <ir...@um...> wrote: -----<br><br></font><blockquote style="border-left: 2px solid #000000; padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">To: wra...@li...<br>From: Jim Irrer <ir...@um...><br>Date: 29/12/2009 23:35<br>Subject: [Wrapper-user] stop/start service from a program<br><br>Hi -<br><br>If I have a service running, is it possible to invoke another<br>program to stop it? (as opposed to using the "Services"<br>dialog in Windows).<br><br>I want this so that when our group re-installs services<br>
the old ones can be shut down automatically. It would also<br>be nice if anyone knows of a way to run a program to tell<br>Windows to start a service.<br><br>Thanks for any info,<br><br>- Jim
<br clear="all"><br>
<font face="Courier New,Courier,monospace" size="3">------------------------------------------------------------------------------<br>This SF.Net email is sponsored by the Verizon Developer Community<br>Take advantage of Verizon's best-in-class app development support<br>A streamlined, 14 day to market process makes app distribution fast and easy<br>Join now and get one step closer to millions of Verizon customers<br><a href="http://p.sf.net/sfu/verizon-dev2dev">http://p.sf.net/sfu/verizon-dev2dev</a> </font><font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>Wrapper-user mailing list<br>Wra...@li...<br><a href="https://lists.sourceforge.net/lists/listinfo/wrapper-user">https://lists.sourceforge.net/lists/listinfo/wrapper-user</a><br></font>
</blockquote><br></div></FONT>
|