I want to know how to detect the running OS using the C++ and which service pack installed
I assume you're writing unmanaged C++ using Win32? Look into the Win32 API GetVersionEx
.
For Windows, see this example called GetOSDisplayString from MSDN, in which the use of GetVersionEx is demonstrated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With