Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit d770de8

Browse files
Fix GPU ID fetching and poll VDD install
1 parent 7bbac92 commit d770de8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

PostInstall/PostInstall.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ function gpu-update-shortcut {
728728
Function provider-specific {
729729
ProgressWriter -Status "Installing Audio Driver if required and removing system information from appearing on Google Cloud Desktops" -PercentComplete $PercentComplete
730730
#Device ID Query
731-
$gputype = get-wmiobject -query "select DeviceID from Win32_PNPEntity Where (deviceid like '%PCI\VEN_10DE%' or deviceid Like '%PCI\VEN_1002%') and (PNPClass = 'Display' or Name like '%Video Controller')" | Select-Object DeviceID -ExpandProperty DeviceID
731+
$gputype = Get-PnpDevice | Where-Object {($_.DeviceID -like 'PCI\VEN_10DE*' -or $_.DeviceID -like '*PCI\VEN_1002*') -and ($_.PNPClass -eq 'Display' -or $_.Name -like '*Video Controller')} | Select-Object InstanceID -ExpandProperty InstanceID
732732
if ($gputype -eq $null) {
733733
}
734734
Else {
@@ -840,8 +840,12 @@ Function Server2019Controller {
840840

841841
Function InstallParsec {
842842
Start-Process "C:\ParsecTemp\Apps\parsec-windows.exe" -ArgumentList "/silent", "/shared" -wait
843-
Import-Certificate -CertStoreLocation "Cert:\LocalMachine\TrustedPublisher" -FilePath "$env:ProgramData\ParsecLoader\parsecpublic.cer"
844-
Start-Process "C:\ParsecTemp\Apps\parsec-vdd.exe" -ArgumentList "/silent" -Wait
843+
Import-Certificate -CertStoreLocation "Cert:\LocalMachine\TrustedPublisher" -FilePath "$env:ProgramData\ParsecLoader\parsecpublic.cer" | Out-Null
844+
Start-Process "C:\ParsecTemp\Apps\parsec-vdd.exe" -ArgumentList "/silent"
845+
While (!(Get-PnpDevice | Where-Object {$_.Name -eq "Parsec Virtual Display Adapter"})) {
846+
Start-Sleep -s 2
847+
}
848+
Stop-Process -name "parsec-vdd" -Force
845849
$configfile = Get-Content C:\ProgramData\Parsec\config.txt
846850
$configfile += "host_virtual_monitors = 1"
847851
$configfile += "host_privacy_mode = 1"

0 commit comments

Comments
 (0)