Lack of classes in WMI when not an administrator

I would like to see the information Win32_PhysicalMediaat the login as a limited user in Windows XP (without administrator rights). It works fine when you log in as Admin, WMIDiagyou just gave a clean health score, and the Win32_DiskDriveclass displays information correctly, but Win32_PhysicalMediacounts 0 for this code

set WMI = GetObject("WinMgtmts:/root/cimv2")
set objs = WMI.InstancesOf("Win32_PhysicalMedia")
wscript.echo objs.count

Alternatively, if the serial number of the hard disk found on the SerialNumber physical disk property is available in another class, which I can read as a limited user, please let me know. I am not trying to write any property with WMI, but I cannot read this when I start as a limited user. Interestingly, it DiskDriveoverlooks the property Signaturethat my application will launch when it starts as a limited user, but is present when it starts with an administrator account.

+3
source share
1 answer

WMI does not provide this information to limited users.

If you can access the Win32 functions from your language, you can call GetVolumeInformation .

+1

Source: https://habr.com/ru/post/1696878/


All Articles