I need to get a hardware disk id.
I use
CreateFile (\\\\.\\PhysicalDrive0",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
and DeviceIoControl (hPhysicalDriveIOCTL, DFP_GET_VERSION....)
In several server windows domain it works correctly with normal user rights,
but I found with some windows domain that it work only if have
administrator rights. I must use it without administrator rights. I suppose
that this depends on group policy setting, - is that true? Is it possible
to give via group policy to PhysicalDrive normal user rights?
I found the utility WINOBJ.EXE .With this I can change permissions to
PhysicalDrive0 but when I had to reboot the PC the permission went back to
original state.
I thank you in advance fro your kind attention and cooperation.
Best regards,
Nicola Micheli