You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Knell, Charles" <ck...@ESNCC.com> on 2012/10/09 23:08:13 UTC

How to exit ANT after starting a Windows program?

I'm using ANT as a general-purpose automation tool. The task I'm working on now extracts data from an Access database and generates an Excel workbook. My default target shells out to Excel and loads the workbook my build file has generated.

While the instance of Excel is open, the ANT script is suspended. Once the workbook has been opened, I really have no further use for the instance of ANT, and I'd like it to exit immediately. I have Googled, but either what I'm looking for is buried deep somewhere, or I'm not asking the question the right way, or I've completely missed the point.

Is there a nice, clean, safe method for causing the ANT process to close once I've had it open the Excel file?

Thanks.

-------------------------------------------------------------------------------
Charles Knell
VA Operations Division Project Management Support Office Lead
(703) 412-4384 - Crystal City
(703) 626-2198 - mobile phone
[Description: SDVOSB-signature-logo]


RE: How to exit ANT after starting a Windows program?

Posted by "Knell, Charles" <ck...@ESNCC.com>.
Thanks! That was what I was looking for. I just didn't know where to look.

-----Original Message-----
From: Vimil Saju [mailto:vimilsaju@yahoo.com] 
Sent: Wednesday, October 10, 2012 3:41 PM
To: Ant Users List
Subject: Re: How to exit ANT after starting a Windows program?

Did you try setting the spawn attribute of exec task to true?

http://ant.apache.org/manual/Tasks/exec.html



________________________________
 From: "Knell, Charles" <ck...@ESNCC.com>
To: Ant Users List <us...@ant.apache.org>
Sent: Wednesday, October 10, 2012 10:34 AM
Subject: RE: How to exit ANT after starting a Windows program?
 
Thank you for your interest. Per your request:

    <target name="openUtilWorkbookInstance" depends="genUtilWorkbookInstance">
        <exec executable="cscript">
            <arg value="${VBScriptPath}\UtilWorkbookRun.vbs"/>
        </exec>
        <exec executable="${MSExcelExePath}">
            <arg line="${OutputPath}/Utilization${FILE_DATE_NAME_PART}.xlsb"/>
        </exec>
    </target>

Excel starts and loads the workbook in the second <exec> task, and the shell in which ANT is running stays open until Excel is closed.
What should (or can) I do to exit the shell in which ANT is running once Excel has been started?

Thanks again.

-----Original Message-----
From: Peter West [mailto:lists@pbw.id.au]
Sent: Tuesday, October 09, 2012 8:55 PM
To: Ant Users List
Subject: Re: How to exit ANT after starting a Windows program?

Show us the relevant ant code. I'm not sure what your problem is.

Peter West

"And as you wish that men would do to you, do so to them."

On 10/10/2012, at 7:08 AM, "Knell, Charles" <ck...@ESNCC.com> wrote:

> I'm using ANT as a general-purpose automation tool. The task I'm working on now extracts data from an Access database and generates an Excel workbook. My default target shells out to Excel and loads the workbook my build file has generated.
>  
> While the instance of Excel is open, the ANT script is suspended. Once the workbook has been opened, I really have no further use for the instance of ANT, and I'd like it to exit immediately. I have Googled, but either what I'm looking for is buried deep somewhere, or I'm not asking the question the right way, or I've completely missed the point.
>  
> Is there a nice, clean, safe method for causing the ANT process to close once I've had it open the Excel file?
>  
> Thanks.
>  
> ----------------------------------------------------------------------
> ---------
> Charles Knell
> VA Operations Division Project Management Support Office Lead
> (703) 412-4384 - Crystal City
> (703) 626-2198 - mobile phone
> 
>  


---------------------------------------------------------------------
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

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


Re: How to exit ANT after starting a Windows program?

Posted by Vimil Saju <vi...@yahoo.com>.
Did you try setting the spawn attribute of exec task to true?

http://ant.apache.org/manual/Tasks/exec.html



________________________________
 From: "Knell, Charles" <ck...@ESNCC.com>
To: Ant Users List <us...@ant.apache.org> 
Sent: Wednesday, October 10, 2012 10:34 AM
Subject: RE: How to exit ANT after starting a Windows program?
 
Thank you for your interest. Per your request:

    <target name="openUtilWorkbookInstance" depends="genUtilWorkbookInstance">
        <exec executable="cscript">
            <arg value="${VBScriptPath}\UtilWorkbookRun.vbs"/>
        </exec>
        <exec executable="${MSExcelExePath}">
            <arg line="${OutputPath}/Utilization${FILE_DATE_NAME_PART}.xlsb"/>
        </exec>
    </target>

Excel starts and loads the workbook in the second <exec> task, and the shell in which ANT is running stays open until Excel is closed.
What should (or can) I do to exit the shell in which ANT is running once Excel has been started?

Thanks again.

-----Original Message-----
From: Peter West [mailto:lists@pbw.id.au] 
Sent: Tuesday, October 09, 2012 8:55 PM
To: Ant Users List
Subject: Re: How to exit ANT after starting a Windows program?

Show us the relevant ant code. I'm not sure what your problem is.

Peter West

"And as you wish that men would do to you, do so to them."

On 10/10/2012, at 7:08 AM, "Knell, Charles" <ck...@ESNCC.com> wrote:

> I'm using ANT as a general-purpose automation tool. The task I'm working on now extracts data from an Access database and generates an Excel workbook. My default target shells out to Excel and loads the workbook my build file has generated.
>  
> While the instance of Excel is open, the ANT script is suspended. Once the workbook has been opened, I really have no further use for the instance of ANT, and I'd like it to exit immediately. I have Googled, but either what I'm looking for is buried deep somewhere, or I'm not asking the question the right way, or I've completely missed the point.
>  
> Is there a nice, clean, safe method for causing the ANT process to close once I've had it open the Excel file?
>  
> Thanks.
>  
> ----------------------------------------------------------------------
> ---------
> Charles Knell
> VA Operations Division Project Management Support Office Lead
> (703) 412-4384 - Crystal City
> (703) 626-2198 - mobile phone
> 
>  


---------------------------------------------------------------------
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

RE: How to exit ANT after starting a Windows program?

Posted by "Knell, Charles" <ck...@ESNCC.com>.
Thank you for your interest. Per your request:

	<target name="openUtilWorkbookInstance" depends="genUtilWorkbookInstance">
		<exec executable="cscript">
			<arg value="${VBScriptPath}\UtilWorkbookRun.vbs"/>
		</exec>
		<exec executable="${MSExcelExePath}">
			<arg line="${OutputPath}/Utilization${FILE_DATE_NAME_PART}.xlsb"/>
		</exec>
	</target>

Excel starts and loads the workbook in the second <exec> task, and the shell in which ANT is running stays open until Excel is closed.
What should (or can) I do to exit the shell in which ANT is running once Excel has been started?

Thanks again.

-----Original Message-----
From: Peter West [mailto:lists@pbw.id.au] 
Sent: Tuesday, October 09, 2012 8:55 PM
To: Ant Users List
Subject: Re: How to exit ANT after starting a Windows program?

Show us the relevant ant code. I'm not sure what your problem is.

Peter West

"And as you wish that men would do to you, do so to them."

On 10/10/2012, at 7:08 AM, "Knell, Charles" <ck...@ESNCC.com> wrote:

> I'm using ANT as a general-purpose automation tool. The task I'm working on now extracts data from an Access database and generates an Excel workbook. My default target shells out to Excel and loads the workbook my build file has generated.
>  
> While the instance of Excel is open, the ANT script is suspended. Once the workbook has been opened, I really have no further use for the instance of ANT, and I'd like it to exit immediately. I have Googled, but either what I'm looking for is buried deep somewhere, or I'm not asking the question the right way, or I've completely missed the point.
>  
> Is there a nice, clean, safe method for causing the ANT process to close once I've had it open the Excel file?
>  
> Thanks.
>  
> ----------------------------------------------------------------------
> ---------
> Charles Knell
> VA Operations Division Project Management Support Office Lead
> (703) 412-4384 - Crystal City
> (703) 626-2198 - mobile phone
> 
>  


---------------------------------------------------------------------
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


Re: How to exit ANT after starting a Windows program?

Posted by Peter West <li...@pbw.id.au>.
Show us the relevant ant code. I'm not sure what your problem is.

Peter West

"And as you wish that men would do to you, do so to them."

On 10/10/2012, at 7:08 AM, "Knell, Charles" <ck...@ESNCC.com> wrote:

> I’m using ANT as a general-purpose automation tool. The task I’m working on now extracts data from an Access database and generates an Excel workbook. My default target shells out to Excel and loads the workbook my build file has generated.
>  
> While the instance of Excel is open, the ANT script is suspended. Once the workbook has been opened, I really have no further use for the instance of ANT, and I’d like it to exit immediately. I have Googled, but either what I’m looking for is buried deep somewhere, or I’m not asking the question the right way, or I’ve completely missed the point.
>  
> Is there a nice, clean, safe method for causing the ANT process to close once I’ve had it open the Excel file?
>  
> Thanks.
>  
> -------------------------------------------------------------------------------
> Charles Knell
> VA Operations Division Project Management Support Office Lead
> (703) 412-4384 – Crystal City
> (703) 626-2198 – mobile phone
> 
>  


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