I want to know, when I install any file on my PC, how do these files get installed? What is actually going behind the scenes? For example, when I install say NetBeans IDE in my windows system, when I'm running it, how does this finds whether Java is already installed in my system or not? How does this it work, is it that the operating system helps in this case, by saying that Java is installed or not? Then how does the OS know this?
feedback
|
migrated from stackoverflow.com Mar 26 '11 at 10:03
This question came from our site for professional and enthusiast programmers.
|
The process is different for each operating system and each program. On Windows, if a program relied on Windows Installer to handle the installation, then the OS is responsible for knowing which version of the product is installed, which components are on the system, and how to clean them up on uninstallation. If a program did not use Windows Installer, then it's up to the setup program to figure out some way of deciding whether the program is installed. Some programs put a setting in a known place in the registry. For example, you can check if | |||||||
feedback
|
|
Depends on the OS/Installer but essentially the files are extracted to the correct locations and in windows registry entries are put in to point to the files. If you are curious as to what files are extracted and what entries are put in the registry then install Sandboxie run the installer in the default sandbox and complete the installation you can then navigate to where the sandbox is located and view what files were put in.... here is good guide on it http://www.raymond.cc/blog/archives/2007/11/02/how-to-investigate-suspicious-file-using-sandboxie/ | |||
|
feedback
|
|
On Windows when you install a file there are typically two distinct sets of items that get copied into the system, in two very distinct places. The first set of items you see are the actual files that the program uses to run, the .exe files and their libraries and documentation, these will typically be what you see in your "Program Files" directory. The second set of items will be all the configuration bits that the program needs. These get stored in what is known as the Registry. You can think of the registry as a filesystem dedicated to configuration options, it houses everything. It is where Explorer stores its settings that it knows in order to run a particular filetype it needs to use a particular program, and much more. There are set places for programs to put their own settings and typically every version of Java or Netbeans would have a set place that it would write a set of strings containing details like version and location of executables so that another program could come along, check that it was installed, and then go on to find out if it was the right version and where to find it, without having to just run "java.exe" and hope that the system was set up right. | |||
|
feedback
|
|
Use Process Monitor from System internals... This is free utility made available by Microsoft. It will enable you to you to track the activities of an installer, or any other application process. You'll be able to see exactly which resource the installer is attempting to access. This includes attempts to access files and directories in the file system, the Windows registry, network activity, and some other operating system stuff. Tip: Process Monitor can generate masses of information. To get a clearer picture of what's going on, you'll want to familiarize yourself with its filtering options early on. | |||
|
feedback
|
