pnp模式

[开ssh]
dism /Online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0
dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0
net start sshd
sc config sshd start=auto
ssh -V
关闭防火墙


[信任证书]
certutil -addstore Root Psc_Driver_Cert.cer
certutil -addstore TrustedPublisher Psc_Driver_Cert.cer


[安装驱动]
pnputil /add-driver C:\psc\a_pnp_test\psc_driver.inf /install
安装失败查看安装日志
findstr /i /c:"psc_driver.inf" /c:"!!!" /c:"style" /c:"error" C:\Windows\INF\setupapi.dev.log



C:\psc\a_pnp_test>pnputil /enum-devices /instanceid "SWD\WycSwEnum\PSC_TestDevice-001"
Microsoft PnP Utility

Instance ID:                SWD\WycSwEnum\PSC_TestDevice-001
Device Description:         PSC_KMDF Root-Enumerated Test Device
Class Name:                 SampleClass
Class GUID:                 {5d0c6218-44be-4e54-a4be-237b5f34e636}
Manufacturer Name:          PSC_Company
Status:                     Problem
Problem Code:               37 (0x25) [CM_PROB_FAILED_DRIVER_ENTRY]
Problem Status:             0xC000000D
Driver Name:                oem12.inf




pnputil /enum-drivers > drivers.txt
findstr /n /i "psc_driver.inf" drivers.txt


pnputil /enum-devices /drivers > devices_drivers.txt
pnputil /enum-devices /disconnected /drivers > disconnected_drivers.txt






pnputil /delete-driver  oem12.inf



pnputil /enum-drivers | findstr /i "psc_driver.inf"



pnputil /enum-devices /ids | findstr /i "MyTestDevice Root\\MyTestDevice"



Published Name:     oem12.inf
Original Name:      psc_driver.inf
Provider Name:      MyCompany
Class Name:         SampleClass Devices
Class GUID:         {5d0c6218-44be-4e54-a4be-237b5f34e636}
Driver Version:     04/23/2026 1.0.0.0
Signer Name:        Unknown



C:\psc\a_pnp_test>pnputil /enum-devices /ids | findstr /i "PSC_TestDevice WycSwEnum"
Instance ID:                SWD\WycSwEnum\PSC_TestDevice-001
Hardware IDs:               Root\PSC_TestDevice

C:\psc\a_pnp_test>pnputil /enum-devices /problem /ids
Microsoft PnP Utility

Instance ID:                SWD\WycSwEnum\PSC_TestDevice-001
Device Description:         PSC_KMDF Root-Enumerated Test Device
Class Name:                 Unknown
Class GUID:                 Unknown
Manufacturer Name:          Unknown
Status:                     Problem
Problem Code:               28 (0x1C) [CM_PROB_FAILED_INSTALL]
Problem Status:             0xC0000490
Hardware IDs:               Root\PSC_TestDevice
Compatible IDs:             PSC_Company\PSC_KMDF_TestDevice
                            SWD\Generic


C:\psc\a_pnp_test>



wevtutil qe System /q:"*[System[(Provider[@Name='Wdf01000'] or Provider[@Name='Microsoft-Windows-Kernel-PnP'])]]" /c:30 /rd:true /f:text > C:\psc\wdf_pnp_full.txt
notepad C:\psc\wdf_pnp_full.txt


C:\psc\a_pnp_test>wmic datafile where name="C:\\Windows\\System32\\drivers\\Wdf01000.sys" get Version
Version
1.31.19041.5794