return false;
catch
Process process = new Process(); process.StartInfo.FileName = "rundll32.exe"; process.StartInfo.Arguments = $"syssetup,SetupInfObjectInstallAction DefaultInstall 128 infPath"; process.StartInfo.Verb = "runas"; // Admin rights process.Start(); process.WaitForExit(); return process.ExitCode == 0; how to install inf files
try
function Install-InfFile param([string]$InfPath) Start-Process pnputil -ArgumentList "/add-driver `"$InfPath`" /install" -Wait -Verb RunAs return false; catch Process process = new Process();