473,508 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Run external BAT file and Close App

I want to run a batch file the exit the application but when I do that the
application doesn't close till the batch file is complete. Could someone
help a rookie? Thanks
Nov 20 '05 #1
3 1972
Hi,

Dim pr as process = Process.Start("MyFile.Bat")
pr.waitforexit

Ken
-------------

"B-Dog" <bd***@hotmail.com> wrote in message
news:#1**************@TK2MSFTNGP11.phx.gbl:
I want to run a batch file the exit the application but when I do that the

application doesn't close till the batch file is complete. Could someone

help a rookie? Thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004
Nov 20 '05 #2
Thanks, we were running into a problem cause we were only closing the form
and not the application running in the tray. Thanks!

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:e0**************@TK2MSFTNGP09.phx.gbl...
Hi,

Dim pr as process = Process.Start("MyFile.Bat")
pr.waitforexit

Ken
-------------

"B-Dog" <bd***@hotmail.com> wrote in message
news:#1**************@TK2MSFTNGP11.phx.gbl:
I want to run a batch file the exit the application but when I do that the
application doesn't close till the batch file is complete. Could someone

help a rookie? Thanks


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004

Nov 20 '05 #3
* "B-Dog" <bd***@hotmail.com> scripsit:
I want to run a batch file the exit the application but when I do that the
application doesn't close till the batch file is complete. Could someone
help a rookie?


\\\
Imports System.Diagnostics
..
..
..
Process.Start("C:\foo.bat")
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1826
by: Ian Davies | last post by:
Hello Stefan or anyone else who can help Some time ago you suggested a solution to my original post about connecting to data on a remote server from a VB application where my host doesnt allow a...
1
1823
by: Aged | last post by:
Hi I have asked several groups now for advise but I feel I must be confusing either them or myself, but anyway here goes! Below is code taken from the "OnClick" function of a command button...
2
2177
by: Matt | last post by:
I have a requirement where a user upload a CSV file to the server through an ASP.NET page. After the file is uploaded the ASP.NET page then has to upload the contents of this file into an Oracle...
2
1002
by: Lance | last post by:
I need to prevent files from being manipulated (e.g., renamed or moved) by external applications (e.g., Windows Explorer) while my app is working with the files. The length of time that my app works...
8
1974
by: Flip | last post by:
I have a website that's using Master pages (very cool). But when I put JS on there (to close the browser for example) coming from an external file, when I navigate away from the first page, the JS...
5
3612
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
4
2576
by: Lad | last post by:
How can I run external program from Python? I use Python with XP Thank you for help LB
2
6119
by: murthydb2 | last post by:
Hi My requirement is that i have to write a stored procedure in db2 and that will be executed in a batch file . Any system error or validation error that occurs inside the db2 sp during...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.