Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Mar 26 '11 at 10:03

This question came from our site for professional and enthusiast programmers.

you should give us more details: the install process depends heavily on the Operating System. what environment are you interested in ? what kind of file are you installing ? – Adrien Plisson Mar 26 '11 at 10:00
up vote 4 down vote accepted

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 HKLM\Software\Microsoft\PowerShell\1\Install exists and equals "1". Other programs may have different behavior.

share|improve this answer
I still don't understand why some programs don't use the built-in Windows Installer system... – Mehrdad Mar 26 '11 at 23:10
@Mehrdad: Windows Installer is definitely more complicated for the developer than xcopy-deployment or a self-extracting archive with a batch script. Many developers don't feel it's worth it to learn, build, and maintain an MSI installer. I personally like using WiX to write an MSI declaratively, but maybe I'm just a glutton for pain. – Stephen Jennings Mar 27 '11 at 2:37
Yeah I like WiX too, I feel it's a lot better than Inno or other installers. It is a bit harder to use, though, I agree. – Mehrdad Mar 27 '11 at 2:44

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.