Lots of applications (specifically dev-oriented ones to be fair) will have a part in the Windows Installer where you can tick a box that says something like "open .xyz with APP_GETTING_INSTALLED". Some better ones give you a list of file extensions that you'd like to open with the installing app.
Been a while since I've seen the WinRAR install screen, but pretty sure it does exactly what I described