Files
kinect/attach/windows/scripts/Disable-TestSigning.ps1
T
kinect-bot 9b5a0255e2
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s
feat(windows): usbip-win runbook ([~]) + clean-room Kinect10.dll NUI shim (x86+x64 export-verified) (wave 9; todo 14 done, 12/13 blocked)
2026-11-25 06:00:12 -05:00

31 lines
1.3 KiB
PowerShell

#requires -Version 5.1
<#
.SYNOPSIS
Turn test-signing back off after you are done with the virtual Kinect (legacy usbip-win path).
.DESCRIPTION
[~] BLOCKED in the kinect build environment (no Windows). RUN THIS ON THE USER'S WINDOWS BOX,
elevated.
WARNING: Do NOT run this while the test-signed usbip-win VHCI driver is still installed and in
use. Disabling test-signing with a test-signed driver still bound will stop every USB device
attached through it from working. Detach all Kinect busids (Detach-Kinect.ps1) and uninstall
the VHCI driver ('usbip.exe uninstall') FIRST, then run this and reboot.
#>
[CmdletBinding()]
param()
$ErrorActionPreference = 'Stop'
$id = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($id)
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
throw 'This script must run in an elevated PowerShell (Run as Administrator).'
}
Write-Host 'Disabling test-signing: bcdedit /set testsigning off' -ForegroundColor Green
bcdedit.exe /set testsigning off
if ($LASTEXITCODE -ne 0) { throw 'bcdedit /set testsigning off failed.' }
Write-Host 'Done. Reboot to apply. Re-enable Secure Boot in firmware if you turned it off.' -ForegroundColor Cyan