JFYI, the sc command is a newer and better command for doing this if you are targeting windows XP and later.
-----Original Message----- From: Burgess, Benjamin [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 11:20 AM To: Ant Users List Subject: RE: Ant to start and stop Windows service <target name="start-mysql"> <exec executable="net" vmlauncher="false"> <arg value="start"/> <arg value="mysql"/> </exec> </target> -----Original Message----- From: hezjing [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 11:07 AM To: ant-users Subject: Ant to start and stop Windows service Hi In Windows command window, I used the following command to start and stop MySQL service > net start mysql The MySQL service was started successfully. > net stop mysql The MySQL service is stopping. The MySQL service was stopped successfully. May I know how to configure Ant to execute a command like this? -- Hez --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ******************************************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ******************************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
