jamesstringerparsec / Easy-GPU-PV

A Project dedicated to making GPU Partitioning on Windows easier!
4.24k stars 426 forks source link

PreChecks.ps1 returns empty when my Computer(Desktop PC) connected to an UPS #389

Open stephsix opened 2 months ago

stephsix commented 2 months ago

In the Function Get-DesktopPC of PreChecks.ps1:

Function Get-DesktopPC
{
 $isDesktop = $true
 if(Get-WmiObject -Class win32_systemenclosure | Where-Object { $_.chassistypes -eq 9 -or $_.chassistypes -eq 10 -or $_.chassistypes -eq 14})
   {
   Write-Warning "Computer is a laptop. Laptop dedicated GPU's that are partitioned and assigned to VM may not work with Parsec." 
   Write-Warning "Thunderbolt 3 or 4 dock based GPU's may work"
   $isDesktop = $false }
 if (Get-WmiObject -Class win32_battery)
   { $isDesktop = $false }
 $isDesktop
}

it returns false when it detects a win32_battery in WmiObject. However, my computer incorrectly matches this condition when connected to an UPS.