In practise, this does not always work, so you really need to keep the original installation files.
To give a very trivial example, suppose you install a program which requires some third party component (for example Microsoft' Visual C++ Runtime). You then install another program which also requires this component. When the second install runs, it detects that this component already exists on the machine it will skip these files and hence your capture routine will not realise this is needed.
So, if you re-format your machine and try to use the second program by copying all the files in your capture log, it will not work because it did not know that it also requires this component.