hi guys,
I've simple question is what happen as general when setup is running i mean what and why the program setup store some settings in registry or hard drive instead of running without setup, i see some applications could run without setup just click and run.
i hope someone answer me.

Sometimes applications require the use of system libraries and tools. Sometimes files may need to be copied to specific folders on the client maching. Another reason may be to ensure that certain software is present (e.g. the latest Java VM). Not all programs require this though. In java you can make a Jar file (a zipped file) executable with no installation at all.

Another reason you may want to install an application is to add desktop and task bar short cuts to make it easy to launch the application. I'm sure there a lots of other reasons for installation.

what happens depends on what the people making the setup script/program programmed it to do.

That's all anyone can say, as it could do anything.

People write specific dlls that are specific to their applications and there dlls are required to be registered with Windows registry so that the calling application knows where the library can be found. Suppose you are using Oracle as a db server then your application requires oci.dll file to connect to the oracle db and you simply use the windows data sources utility to locate the dll and create a data source. This dll here acts as an interface between your application and the oracle db server. It knows how to connect to the oracle and you just pass some parameters to it. Similarly, you can write your own dll. COM programming can give you a better understanding. Suppose in COM you are writing a server and a client. Then on the client side, the server specific parameters needs to be registered with the windows registry. Remember you will again be writing an interface that will be registered with the client and knows how to connect to the server.