File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -115,17 +115,14 @@ def components(self):
115
115
self .main .pack (padx = 10 , pady = 10 , fill = tk .BOTH , expand = True )
116
116
117
117
def getGPUCard (self ):
118
- # command = 'Start-Process powershell -Verb RunAs -ArgumentList "-file",".\PreCheck.ps1"'
119
- # command = ('powershell "$Devices = (Get-WmiObject -Class "Msvm_PartitionableGpu" -ComputerName $env:COMPUTERNAME -Namespace "ROOT\\virtualization\\v2").name\n'
120
- # 'Foreach ($GPU in $Devices) {\n'
121
- # '$GPUParse = $GPU.Split(\'#\')[1]\n'
122
- # 'Get-WmiObject Win32_PNPSignedDriver | where {($_.HardwareID -eq "PCI\\$GPUParse")} | select DeviceName -ExpandProperty DeviceName\n'
123
- # '}\n\n"')
124
118
command = 'powershell .\\ PreCheck.ps1'
125
119
print (command )
126
120
process = subprocess .run (command , shell = True , text = True , capture_output = True )
127
- outputs = process .stdout
121
+ outputs = process .stdout . split ( " \n " )
128
122
print (outputs )
123
+ self .view ['gpu_name' ]['entry' ]['values' ] = outputs
124
+ self .view ['gpu_name' ]['entry' ].current (0 )
125
+ return outputs
129
126
130
127
131
128
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments