Powershell to display Regsvr32 result in console instead of dialog -


i've searched did not find answer.
task register 1 dll using powershell ps1, followed other lines of scripts. don't want interrupted dialog, added /s parameter. result information ignored, no matter succeed or fail. want result displayed in console. how?

launch regsvr32.exe /s start-process -passthru , inspect exitcode property:

$regsvrp = start-process regsvr32.exe -argumentlist "/s c:\path\to\your.dll" -passthru $regsvrp.waitforexit(5000) # wait (up to) 5 seconds if($regsvrp.exitcode -ne 0) {     write-warning "regsvr32 exited error $($regsvrp.exitcode)" } 

Comments