Hope this helps This can't be done in Visual Studio setups - the only validation supplied is the serial number template, a masked edit control to verify the basics. This is because Visual Studio setups custom actions all run after the files are installed, and you cannot associate one with a button click to validate the serial number, or in fact anything in the UI. You might need to use another tool for your setup. VS setups are pretty simple but they don't have many features. Otherwise you could use another tool to build a merge module that you could add. Manually editing the MSI file is a possibility but you'd need to know a lot about the internals of MSI files.
Does that help .ini files are for configuration; they aren't "executed". Did you mean an .inf file? But .inf files are usually used as a simple substitute for a ful setup program, which you seem to have.
Is there any point to the setup.exe file created by a setup project in Visual Studio?
To fix this issue Kristopher Johnson is correct about the older machines, but it also does something else. When you are setting up the installer you can set dependencies and locations to download those dependencies. The Setup.exe does those dependency checks and launches the other MSI files in to install them. This is most often used to make sure Windows has the correct version of .NET or the C++ runtime installed. If you do not have dependencies and you can guarantee .NET or the C++ runtime is installed then you do not need to distribute the setup.exe file.
Creating Exe/MSI for C# Windows Forms using Visual Studio 2017 Setup Project
will help you The only project with the Install option is the setup project. Other projects in the solution do not have install option just because there is a setup project as part of the solution. References in a non-setup project (such as a C# build) are not automatically included in a setup project. References used to build code are not necessarily things that need installing on the target system. The setup will try to help with dependencies, but it's unreliable, and only a guide. For example, your Application Folder view contains some files that are part of the .NET Framework, and you definitely don't install them because they are installed as part of the standard .NET framework install.