That's exactly what i was going to do at the begining, but i have to find exacly the words like "Licensed" or "Grace period" in the output for then returning em to an edit... it'd be boring. Plus i want something else than always dealing with slmgr
C#: Code: bool Licensed = false; try { foreach (ManagementObject Obj in new ManagementObjectSearcher("root\\CIMV2", "SELECT LicenseStatus FROM SoftwareLicensingProduct WHERE LicenseStatus = 1").Get()) { Licensed = true; } } catch (ManagementException) { Licensed = false; }
Here is how to check the License Status with Microsoft C++, compiled with VS2010. It uses WMI but I've edited it and it takes less than a second to check. Download the source here.
I wanna thank you all for your help, i'm using the slmgr trick since i dont have time to learn more about WMI, but holidays (Christmas holidays) are comming soon and i'll have time to get back to programming, cuz as i said u i'm getting extremly busy at that moment and i can't do anything like coding and learning stuff.
The better solution for anything you need >> post here for our coders/developers to help you (I like the open source code help we give here @ MDL as it also helps others)
Hey, ok i've been learning WMI and i notice it's really cool stuff. I can access several low level infos with this, thx all of you. i'm now learning C++ since i can't use Qt with C, besides i'm fed up with WinAPI which is hard to handle and lots of code for little things, nah...