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

Commit c37eac6

Browse files
Add timeout for VDD install
1 parent d770de8 commit c37eac6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

PostInstall/PostInstall.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,15 @@ Function InstallParsec {
842842
Start-Process "C:\ParsecTemp\Apps\parsec-windows.exe" -ArgumentList "/silent", "/shared" -wait
843843
Import-Certificate -CertStoreLocation "Cert:\LocalMachine\TrustedPublisher" -FilePath "$env:ProgramData\ParsecLoader\parsecpublic.cer" | Out-Null
844844
Start-Process "C:\ParsecTemp\Apps\parsec-vdd.exe" -ArgumentList "/silent"
845-
While (!(Get-PnpDevice | Where-Object {$_.Name -eq "Parsec Virtual Display Adapter"})) {
845+
$iterator = 0
846+
do {
846847
Start-Sleep -s 2
848+
$iterator++
849+
}
850+
Until (($null -ne ((Get-PnpDevice | Where-Object {$_.Name -eq "Parsec Virtual Display Adapter"}).DeviceID)) -or ($iterator -gt 7))
851+
if (Get-process -name parsec-vdd -ErrorAction SilentlyContinue) {
852+
Stop-Process -name parsec-vdd -Force
847853
}
848-
Stop-Process -name "parsec-vdd" -Force
849854
$configfile = Get-Content C:\ProgramData\Parsec\config.txt
850855
$configfile += "host_virtual_monitors = 1"
851856
$configfile += "host_privacy_mode = 1"

0 commit comments

Comments
 (0)