Actually it is the developers who write the scripts that are compiled into an installer/uninstaller file that is processed by the developer's choice of third party installers such as MS Windows Installer, Wise, Quest, Tarma, . . .

Most applications using third party installers ask questions then proceed based upon the user's response.
The installers process whatever is scripted by the developer including the removal of files and registry entries. BTDT