Sometimes, it's useful to have a computer report its operating system through a Software Component, for example, for Asset information. By creating a detection rule for a new (or existing) operating system component in the Software Catalog, it would be easy to link them. To do this, you need the Inventory Solution Agent installed to the computers you want to detect.
First, check the Software Catalog to see if you have a resource for the desired operating system already, such as "Windows XP Professional - English" which might be on your system already, if you have Patch Management installed. If the desired one is not there, then create the resource for it.
Then, go to the Rule tab and create a new detection rule.
Typically, one or two expressions will be enough, but it depends on how detailed you want the rule to be.
In the above example, two registy values were used: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion with a "ProductName" of "Microsoft Windows XP" and the same path with the "CurrentVersion" of "5.1". Different versions of the operating system will have different values to be detected, so check the operating system you want to detect. Also note that the component can be general (Windows XP) or very specific (Windows XP Professional x64 SP2), depending on the need.
Once you create the Detection Rule and save the Software Component, you will need to detect it. Right click the component in the Software Catalog and choose Action > Create Targeted Software Inventory. You can also find these under Manage > Policies, then under Discovery and Inventory > Targeted Software Inventory. It's safe to run the inventory on all computers with the Inventory Plug-in, as only the ones with the desired operating system will report it as installed.