Hi Yong. Try something along the lines of <exec executable="service" os="Windows"> and set the command line parameters to have the service name and start or stop, depending on what you are trying to do. I apologize, but I do not remember the exact syntax of the M$ "service" command, but a little experimentation and research should get you what you need.
NB: You probably need to use an account with admin privileges to use the service command. -Steve Kim, Yong wrote: > It's sort of more generic question on Ant... Does anyone know (or even it's > possible to do) how to stop and start the NT service using ANT? I am > running JBoss as a NT service and I'd like to stop and start the JBoss using > ANT... > > Thanks in advance, > Mitch > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > -- Java/J2EE Developer/Systems Integrator Looking for a new job opportunity 214-724-7741 ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user