There are applications that do allow you to do things like this, but to use them successfully, you should have a strong understanding of how they work and what their limitations are. Generally they work pretty good for most applications, but any software you install which is licensed by machine and may have any measures to strongly tie or enforce the licensing to the machine(s) it is licensed for, typically will not work.
Currently, in my experience, the types of applications that do this are installation builder applications which are usually meant for software developers to package up and provide an installer for end users to run on their PC. Some of these offer a feature called a repackager. One in particular I'm familiar with is InstallSheild which has had that feature for as long as I can recall. However, InstallShield is not a free solution. It is not even remotely what one might call an inexpensive application, as it is a tool that is typically sold to professional software developers and large organizations.
Any of the tools I have ever seen that have this type of functionality will always require you todo this as a specific step. In other words, you cannot do it after the fact (after the software is already installed). You must start with the repackaging software/step before you install the application, so the repackager can monitor or snapshot the changes that occur on the system.
I'm sure there are at least a few other similar applications, but this is the only one I have any recent experience with. I have never seen anything in recent years that would have this kind of functionality at a price point a non-professional would afford a license for. If there is something recent that does, I would certainly love to hear about it and check it out also. There used to be a product by Symantec that was very affordable, but this was back in the Windows 95/98 era and it was discontinued after a short time on the market. I assume it might have been killed off due to their acquisition of Wise, which used to have a competing product to InstallShield.