hi everyone

now icheck if program is running or not using this code

Process[] pname = Process.GetProcessesByName("AIM");
if (pname.Length == 0)
MessageBox.Show("nothing");
else
MessageBox.Show("run")


all that i need is to be sure that the program is closed before taking my action and shows for the user that the program AIM is already running. you must close it before completing (OK,Cancel)

and after pressing ok i will put my fuction

for example:
when you install the photoshop and the program is already running it shows for you that the program is already running. you must close it before completing (OK,Cancel)


and after clicking OK .. the program will compltete instalation

Recommended Answers

All 2 Replies

Now, that it is not of my bussiness, but why would you like to install a program that is already running?
An installer will take care of all the chores needed to be done, I suppose.
Or do I not understand your English very well?

Now, that it is not of my bussiness, but why would you like to install a program that is already running?
An installer will take care of all the chores needed to be done, I suppose.
Or do I not understand your English very well?

i want to show for the user a message box "the program is already running please close it first before downloading the updates" and if he press OK.. it will download the updates .. Cancel it will close the prompt that's all.. bu ti need to know how to make this task

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.