When the .NET Framework is being installed on a computer the .NET installer writes registry keys when installation is successful. You can test whether the .NET Framework 4.5 or later is installed by checking the registry key
HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full for a
DWORD value named Release. The existence of this key indicates that the .NET Framework 4.5 or later has been installed on that computer.