Repair Microsoft SAPI

I was able to repair the microsoft SAPI text to speech engine (TTS). Save the following Powershell code to a folder alongside "extract.exe" which is a tool to extract CAB files. Change the $source_folder to the folder containing your i386 directory (mine's on my C drive).

Code:

$source_folder = "c:\i386\"
$working_inf = "sapi5.inf"

$source_inf = $working_inf.trimend('f') + "_"
$working_folder = ".\working\"
$dependency_folder = ".\working\i386\"

.\extract /y $source_folder$source_inf /l $working_folder

$files_to_extract = type $working_folder$working_inf | where {$_ -match "^[\d\w]*\.[\d\w]{3}$"}

foreach($current_file in $files_to_extract)
{
$source_file = $current_file.substring(0, $current_file.length-1) + "_"
.\extract /y $source_folder$source_file /l $dependency_folder
}


The script will extract the inf file which you can use to repair. It will also scan that inf file for dependencies and extract those. Once it completes - find the sapi5.inf and right click and select "install".

Good luck!

0 comments :: Repair Microsoft SAPI