473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Stopping a running program.

UJ
I've got a program that will do some updates to the system. During that
time, if a certain program, called a.exe is running, I want to stop the
program, do what I need to do and restart the program.

How can I find out if a.exe is currently running and stop it?

TIA - UJ.
Oct 25 '05 #1
2 1406
Like this

Dim Process As System.Diagnostics.Process
Process =
System.Diagnostics.Process.GetProcessesByName("Pro cessName")(0)
Process.Kill()

"UJ" wrote:
I've got a program that will do some updates to the system. During that
time, if a certain program, called a.exe is running, I want to stop the
program, do what I need to do and restart the program.

How can I find out if a.exe is currently running and stop it?

TIA - UJ.

Oct 25 '05 #2
To restart the process

_Process = New System.Diagnostics.Process
_Process.Start("PathToExe.exe")

"UJ" wrote:
I've got a program that will do some updates to the system. During that
time, if a certain program, called a.exe is running, I want to stop the
program, do what I need to do and restart the program.

How can I find out if a.exe is currently running and stop it?

TIA - UJ.

Oct 25 '05 #3

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

Similar topics

23
by: ern | last post by:
I have a program that runs scripts. If the user types "script myScript.dat" the program will grab commands from the text file, verify correctness, and begin executing the script UNTIL... I need...
2
by: UJ | last post by:
I've got a program that will do some updates to the system. During that time, if a certain program, called a.exe is running, I want to stop the program, do what I need to do and restart the...
2
by: iwdu15 | last post by:
hi, i have the following line of code Dim fsUser As New IO.FileStream(SnPath & s.Identity & "\UserData\info.ppf", IO.FileMode.Create, IO.FileAccess.Write) in a sub, SnPath is not null,...
1
by: dfaber | last post by:
Aloha! I want to terminate a process/program from within a python script. For example, if I have a program say foo.sh that starts running, then I can run it from within a python script using...
4
by: bjm | last post by:
I am writing a program that will automate a series of application installations. I want to give the user the option of stopping the program's execution in between installations (for example, give...
3
by: grace | last post by:
dear everyone, we installed a mysql vr standard-4.11.22a-pc on a machine with ubuntu breezy badger as os..after the installation we are trying to start the server by typing :bin/safe_mysqld...but...
5
by: gobblegob | last post by:
I would like to know some code to check if my program is running, if so then not load. Thanks in advanced, Gobble.
5
hsn
by: hsn | last post by:
hello everyone i am creating a system full of programs here and there. think about it like this there is a big program and there are mini programs running. how can i through the big program stop...
2
by: Steve | last post by:
Hi All, I've been trying to come up with a good way to run a certain process at a timed interval (say every 5 mins) using the SLEEP command and a semaphore flag. The basic thread loop was always...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.