Skip to content

Commit 003cd8f

Browse files
Use installer package for virtual-display driver
CI: download both the portable and installer zips for virtual-display-rs, extract them to distinct paths, and install the driver via the installer package. The workflow now uses the installer DriverCertificate.cer (added to Root and TrustedPublisher) and pnputil to add/install the .inf instead of manually copying the DLL and importing registry entries. Also adjusted downloaded filenames and log messages for clarity.
1 parent 9cef44b commit 003cd8f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,24 @@ jobs:
134134
# install virtual-display-rs driver using the portable zip + nefconw
135135
$vdaRepo = "https://github.com/MolotovCherry/virtual-display-rs"
136136
$vdaPortableUrl = "$vdaRepo/releases/download/v0.3.1/virtual-desktop-driver-portable-x64.zip"
137+
$vdaInstallerUrl = "$vdaRepo/releases/download/v0.3.1/virtual-desktop-driver-installer-x64.zip"
137138
$nefconUrl = "$vdaRepo/raw/master/installer/files/nefconw.exe"
138-
DownloadFile -Uri $vdaPortableUrl -OutFile "virtual-display-rs.zip"
139+
DownloadFile -Uri $vdaPortableUrl -OutFile "virtual-display-rs-portable.zip"
140+
DownloadFile -Uri $vdaInstallerUrl -OutFile "virtual-display-rs-installer.zip"
139141
DownloadFile -Uri $nefconUrl -OutFile "nefconw.exe"
140142
141-
Write-Information "Download complete, extracting archive..." -InformationAction Continue
142-
Expand-Archive -Path "virtual-display-rs.zip" -DestinationPath "virtual-display-rs"
143+
Write-Information "Extracting archives..." -InformationAction Continue
144+
Expand-Archive -Path "virtual-display-rs-portable.zip" -DestinationPath "virtual-display-rs"
145+
Expand-Archive -Path "virtual-display-rs-installer.zip" -DestinationPath "virtual-display-rs-installer"
143146
144147
Write-Information "Trusting driver certificate..." -InformationAction Continue
145-
$cat = (Resolve-Path "virtual-display-rs\virtualdisplaydriver.cat").Path
146-
certutil -addstore -f "TrustedPublisher" $cat
147-
certutil -addstore -f "Root" $cat
148+
$cer = (Resolve-Path "virtual-display-rs-installer\DriverCertificate.cer").Path
149+
certutil -addstore -f "Root" $cer
150+
certutil -addstore -f "TrustedPublisher" $cer
148151
149-
Write-Information "Copying driver to System32..." -InformationAction Continue
150-
$umdfDir = "$env:SystemRoot\System32\drivers\UMDF"
151-
New-Item -ItemType Directory -Force -Path $umdfDir | Out-Null
152-
Copy-Item "virtual-display-rs\VirtualDisplayDriver.dll" -Destination $umdfDir -Force
153-
154-
Write-Information "Importing registry entries..." -InformationAction Continue
155-
reg import "virtual-display-rs\install.reg"
152+
Write-Information "Installing driver via pnputil..." -InformationAction Continue
153+
$inf = (Resolve-Path "virtual-display-rs\VirtualDisplayDriver.inf").Path
154+
pnputil /add-driver $inf /install
156155
157156
Write-Information "Creating device node..." -InformationAction Continue
158157
$nefcon = (Resolve-Path "nefconw.exe").Path

0 commit comments

Comments
 (0)