ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Fernandez <Alec.Fernan...@sas.com>
Subject RE: Ant to start and stop Windows service
Date Thu, 10 Jan 2008 01:51:15 GMT
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:BBurgess@tiaa-cref.org]
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:hezjing@gmail.com]
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: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org

********************************************************************************************
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: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message