System Drive
-
-
I used WMI to get the information of all physical and logical drive information of the system. It works fine with windows XP. But WMI fails to in Windows Vista and Windows 7. I think because of Securities issues? If yes then how can I bypass these?
WMI needs administrative privileges even for XP. You can always run you're application requiring elevated privileges in Vista onwards.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
I used WMI to get the information of all physical and logical drive information of the system. It works fine with windows XP. But WMI fails to in Windows Vista and Windows 7. I think because of Securities issues? If yes then how can I bypass these?
yes you are correct. Windows Vista and 7 have additional security features, please try CoInitializeSecurity() with following params. CoInitializeSecurity( NULL,-1,NULL,NULL,RPC_C_AUTHN_LEVEL_PKT ,RPC_C_IMP_LEVEL_IDENTIFY, NULL,EOAC_NONE,NULL);