PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET calling a .bat program in a vb .net program

Reply

calling a .bat program in a vb .net program

 
Thread Tools Rate Thread
Old 15-11-2006, 09:11 PM   #1
Janet
Guest
 
Posts: n/a
Default calling a .bat program in a vb .net program


Hi,

I need to call a .bat program inside a vb .net program. I need to be
able to start the process and kill the process. I have yet to find
anything on this but have just started searching. Can someone
enlighten me? It was be very much appreciated.

Thanks,
Janet Heath

  Reply With Quote
Old 15-11-2006, 09:17 PM   #2
Janet
Guest
 
Posts: n/a
Default Re: calling a .bat program in a vb .net program

I need to stop or kill and then start the .bat after the .asp file is
removed.


'We need to delete the palmerup.asp file
'First we need to see if it exists before deleting the file
If errmsga = "Yes" And errmsgb = "Yes" And errmsgc = "Yes"
And msga = "Yes" And System.IO.File.Exists(sripalmerupfile) = True Then
'If w > -1 And x > -1 And y > -1 And z = -1 Then
'If System.IO.File.Exists(sripalmerupfile) = True Then
'Console.WriteLine(Line)
'Console.WriteLine(w)
'Console.WriteLine(x)
'Console.WriteLine(y)
'Console.WriteLine(z)
System.IO.File.Delete(sripalmerupfile)
Console.WriteLine("Removed palmerup.asp file")
'Console.WriteLine("sripalmerwebupfile exist")
End If



Janet wrote:
> Hi,
>
> I need to call a .bat program inside a vb .net program. I need to be
> able to start the process and kill the process. I have yet to find
> anything on this but have just started searching. Can someone
> enlighten me? It was be very much appreciated.
>
> Thanks,
> Janet Heath


  Reply With Quote
Old 15-11-2006, 09:20 PM   #3
Spam Catcher
Guest
 
Posts: n/a
Default Re: calling a .bat program in a vb .net program

"Janet" <jowens@wehco.com> wrote in news:1163625086.059857.129960
@h54g2000cwb.googlegroups.com:

> I need to call a .bat program inside a vb .net program. I need to be
> able to start the process and kill the process. I have yet to find
> anything on this but have just started searching. Can someone
> enlighten me? It was be very much appreciated.
>


Take a look at the System.Diagnostics classes.
  Reply With Quote
Old 15-11-2006, 09:55 PM   #4
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: calling a .bat program in a vb .net program

"Spam Catcher" <spamhoneypot@rogers.com> schrieb:
>> I need to call a .bat program inside a vb .net program. I need to be
>> able to start the process and kill the process. I have yet to find
>> anything on this but have just started searching. Can someone
>> enlighten me? It was be very much appreciated.

>
> Take a look at the System.Diagnostics classes.


More specifically: 'System.Diagnostics.Process' and its 'Start' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
  Reply With Quote
Old 15-11-2006, 10:32 PM   #5
Janet
Guest
 
Posts: n/a
Default Re: calling a .bat program in a vb .net program

Right.

Spam Catcher wrote:
> "Janet" <jowens@wehco.com> wrote in news:1163625086.059857.129960
> @h54g2000cwb.googlegroups.com:
>
> > I need to call a .bat program inside a vb .net program. I need to be
> > able to start the process and kill the process. I have yet to find
> > anything on this but have just started searching. Can someone
> > enlighten me? It was be very much appreciated.
> >

>
> Take a look at the System.Diagnostics classes.


  Reply With Quote
Old 15-11-2006, 10:52 PM   #6
Janet
Guest
 
Posts: n/a
Default Re: calling a .bat program in a vb .net program

Thanks, Herfried!

Janet wrote:
> Right.
>
> Spam Catcher wrote:
> > "Janet" <jowens@wehco.com> wrote in news:1163625086.059857.129960
> > @h54g2000cwb.googlegroups.com:
> >
> > > I need to call a .bat program inside a vb .net program. I need to be
> > > able to start the process and kill the process. I have yet to find
> > > anything on this but have just started searching. Can someone
> > > enlighten me? It was be very much appreciated.
> > >

> >
> > Take a look at the System.Diagnostics classes.


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off