Python Forum
wmi returns no data from an other pc
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wmi returns no data from an other pc
#6
You are overwriting hdd variable in the loop.
import wmi

hdd = []
c = wmi.WMI()
for item in c.Win32_PhysicalMedia():
   hdd.append(item)

#print(hdd)
print(hdd[0])
Output:
instance of Win32_PhysicalMedia                 {                                                      SerialNumber = "S1ATNEAD7xxxxxx     ";          Tag = "\\\\.\\PHYSICALDRIVE1";           };                                              
Quote:It works fine in my pc, but in my client 's pc it returns nothing!
Pc most have Pytnhon and wmi installed.
It still can be problem on some pc,
because this is accessing at a low level that can restricted.
Reply


Messages In This Thread
wmi returns no data from an other pc - by panoss - May-29-2017, 12:15 PM
RE: wmi returns no data from an other pc - by snippsat - May-29-2017, 03:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How returns behave in a function with multiple returns? khasbay 1 319 May-19-2024, 08:48 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020