I want to know, which programs are installed.
and then aftEr if I Get the program theN it should find locatioN of programs...
while here the user should not able to do anything accept clickIng on button 1
I mean this whole process should be dOne in background

You'll need to be more clear.

From what it sounds, you want to write a program that lists all of the users programs, finds their location, and stops them from doing anything besides click one button? - It sounds like a highly invasive program.

And it needs to be done in the background? How can you give the user a button to push, while keeping the program in the background?

Sorry, But i dont want the user to give any Btn.
Btn is just to start the process. (not to stop process)

The Process should be background.

let me explain you with example:
I want to know whether IDM is installed or not.?
If Installed then at which location and as I got my target File: the rest process is useless so it should stop.

THIS WAS JUST EXAMPLE,

Actually I want to do with my own Program, As if there any update then it will direct download plugins and move to that desire location.
and so user will still not know that th files downloaded were installed to programs location.

Detecting wether or not a program is "installed" depends on how it was installed. Also, finding it's location also depends on how it's installed.

But, since this is your own program, why not just bundle an updater with it? Then you know it's installed, and you know it's location.

Yeah Hiroshe:You are right.
This can be done.

But, I want to apply the another way which all programmers dont do.
BTW: Thanks for your reply, Untill Now and just now I am using this way only.
But I want some changes in my program so....
(y)

There are a few alternatives ways to make an updater if you want something different.

(1) Before launging the program.

(2) While the user is running the program.

(3) Make an installer that will update the users current installation (this requires that you know how the program was previously installed).

(4) Have something update the program when the computer starts up. I do not recommend this becasue it's annoying for the user.

There isnt some universal way to detect if a program is installed. Generally there will be something in the registry (is, standard windows installers). It might also include a path in the registry. Depends on the program though. It might be better to check the Users Path (for example, something like mingw). Yet another method would be to look through possible installation directories, and if it's not found, ask the user where it is. So, feel free to leave something in the registry during installation.

Then you just need to figure out how to run something in the background (shouldn't be hard, I know theres something in .net for it. look it up).

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.