Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
354 B

on error resume next
set obj = GetObject("winmgmts:{impersonationLevel=impersonate}!win32_diskpartition.DeviceId=""Disk #0, Partition #1""")
WScript.Echo obj.Path_.Class
for each system in obj.Associators_ (,"Win32_ComputerSystem")
WScript.Echo system.Name
next
if err <> 0 then
WScript.Echo err.number, err.description, err.source
end if