I have an application that needs to get the harddisk serial number to check against a license. Currently I'm doing this using WMI but this is always causing troubles.
My idea now was to use a combination of CreateFile and DeviceIoControl, but these ones require elevated privileges to run properly.
Since I need to check the license on each application startup this would mean that I have to ask the user that the application starts in admin mode, which is pretty annoying.
So my question is, if there exists a possibility to ask the user once and then remember his decision on the next application startup?