I’m after some code snippets for NSIS to detect and conditionally run the .NET 4.5 installer
This answer – NSIS Installer with .NET 4.0 – is too naive as checking only the presense of the registry key (not the value) will not discriminate between 4.0 and 4.5
You shouldn’t check for an exact version number. This will change in the future (as was the case for 4.0 > 4.5). Instead use the codes from the deployment guide.
In addition to that you should try to handle the reboot from .Net 4.5.