vb.net - Killing an existing process -
i trying build script starts, , later stops process:
public class form1 private sub button2_click(byval sender system.object, byval e system.eventargs) handles button2.click process.start("c:\batchfile.bat") end sub private sub button1_click(byval sender system.object, byval e system.eventargs) handles (desired code here) end sub end class
button2
starts process batchfile.bat
. need find way end process when button1
clicked. there relatively simple way this?
please check sample code
dim p1 process private sub button1_click(byval sender system.object, byval e system.eventargs) handles button1.click p1 = process.start("c:\users\082043\desktop\akshay.bat") end sub private sub button2_click(byval sender system.object, byval e system.eventargs) handles button2.click p1.kill() end sub
vb.net process kill
No comments:
Post a Comment