3

I guess this is mostly a Windows thing but why do some programs need to be installed to work properly and then uninstalled to be removed, where some others just come as executable files that can be run and deleted independently?

6
  • 2
    Most programs do not actually have to be installed. It entirely depends on the desire of the author of the program. There are multiple reasons a programmer would go to the effort of creating an installer for their program. The question as it's currently written is extremely broad. Please reduce the scope of your question to a practical problem you are having.
    – Ramhound
    Commented Aug 24, 2017 at 19:43
  • 1
    @Ramhound you're not entirely correct. There is only one reason why some programs require installation while others don't: the usage of shared dll's.
    – LPChip
    Commented Aug 24, 2017 at 20:08
  • 1
    If I were to provide a copy of a specific version of one of the dll's installed by Visual C++ Redistribution, and placed it within a simple compressed archive, that program would use that copy of the file before any other file on the system. So I don't really agree with the statement, that shared library files are the reason installers are used.
    – Ramhound
    Commented Aug 24, 2017 at 20:14
  • As a programmer, this is what I learned. But I guess its a matter of opinion.
    – LPChip
    Commented Aug 24, 2017 at 20:14
  • 1
    I can agree that it depends on the shared file. The problem with broad statements is that, I could write a simple .bat script, that does everything an .msi installer would typically do. In the past the only time I had to script an installer for one of my programs was a Windows COM library, that is because during the installation process the installer would typically, register the Windows COM library I had created.
    – Ramhound
    Commented Aug 24, 2017 at 20:18

1 Answer 1

3

When a programmer uses a function that is not native to windows but instead requires a shared dll, for example a framework of some sort, the program needs to be installed in order to make sure all shared dll's are placed at the correct place.

Uninstall does the same thing, it will see if the shared dll's used by the program are used by other programs, and if not, then it removes the shared dll's.

Shared dll's are usually placed in the C:\Windows\System32 (or syswow64 respectively) folder.

Sometimes a programmer just wants to include an installer so it automatically places shortcuts in the start menu and/or desktop, while the program itself doesn't actually use shared dll's.

Lastly, some programming language compile script code into an executable and use certain libraries. Visual Basic is a form of such language. In these cases, you do need to bundle a set of dll's with your program in order to ensure they work properly. Copying the executable may still work if those shared dll's are already present on the system, but if they aren't the user will get an error claiming they miss a certain file, for example: vbvm50.dll (Visual Basic 5.0 runtime)

2
  • 2
    This answer is seriously incomplete. Let's add a few things (courtesy of Wikipedia): Making sure that necessary system requirements are met, Checking for existing versions of the software, Creating or updating program files and folders, Adding configuration data such as configuration files, Windows registry entries or environment variables, Making the software accessible to the user, for instance by creating links, shortcuts or bookmarks, Configuring components that run automatically, such as daemons or Windows services, Performing product activation, Updating the software versions...
    – misha256
    Commented Aug 25, 2017 at 3:28
  • Placing shared DLLs to Windows folder has been discouraged for a very long, yet people still say that shared DLLs are copied to Windows directories. However, it's still true to some extent: shared side-by-side assemblies are stored under Windows directory, and the only way they can be managed is by Windows Installer. Commented Sep 10, 2017 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .