mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 17:46:36 +00:00
replace get hardware info to powershell instead of wmic
This commit is contained in:
@@ -45,9 +45,11 @@ cdef class HardwareService:
|
||||
cdef HardwareInfo get_hardware_info(self):
|
||||
if self.is_windows:
|
||||
os_command = (
|
||||
"wmic CPU get Name /Value && "
|
||||
"wmic path Win32_VideoController get Name /Value && "
|
||||
"wmic OS get TotalVisibleMemorySize /Value"
|
||||
"powershell -Command \""
|
||||
"Get-CimInstance -ClassName Win32_Processor | Select-Object -ExpandProperty Name | Write-Output; "
|
||||
"Get-CimInstance -ClassName Win32_VideoController | Select-Object -ExpandProperty Name | Write-Output; "
|
||||
"Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -ExpandProperty TotalVisibleMemorySize | Write-Output"
|
||||
"\""
|
||||
)
|
||||
else:
|
||||
os_command = (
|
||||
|
||||
Reference in New Issue
Block a user