Windows PowerShell: how to Set and Run Download of TTS language onto Windows 10 via

1

1

I would like to install a language voice onto Windows 10.

Using the [Windows PowerShell] (see this link) and the following commands is possible to add a new language in the Windows 10:

PS C:\> $OldList = Get-WinUserLanguageList
PS C:\> $OldList.Add("fr-FR")
PS C:\> Set-WinUserLanguageList -LanguageList $OldList  

The result will be like this: Windows Area/Language Settings

But this is the first step only beacause the language package must be downloaded.

How could I run the Download and Installation of the TTS voice?

Thanks in advance

orecchione bruno

Posted 2019-01-22T19:10:19.380

Reputation: 13

I tried again that command and it works... I didn't see that Windows start to download in the background. SORRY – orecchione bruno – 2019-01-23T18:40:36.720

At the end I've done it in this way: powershell -command "& {$OldList = Get-WinUserLanguageList; $OldList = $OldList + 'es-ES'; &'Set-WinUserLanguageList' -Force -LanguageList $OldList}" – orecchione bruno – 2019-01-24T11:36:22.860

Answers

0

It does not matter what the file is you want to download, downloading using PowerShell is the same.

3 ways to download files with PowerShell

1. Invoke-WebRequest

The first and most obvious option is the Invoke-WebRequest cmdlet. It is built into PowerShell and can be used in the following method:

Invoke-WebRequest -Uri $url -OutFile $output

2. System.Net.WebClient

A common .NET class used for downloading files is the System.Net.WebClient class.

$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output)

3. Start-BitsTransfer

If you haven't heard of BITS before, check this out. BITS is primarily designed for asynchronous file downloads, but works perfectly fine synchronously too (assuming you have BITS enabled).

Start-BitsTransfer -Source $url -Destination $output -Asynchronous

Installation is just using PowerShell's cmdlet to start the installer.

Start-Process -FilePath 'PathToInstaller'

postanote

Posted 2019-01-22T19:10:19.380

Reputation: 1 783

Hi thank your for your answer, but my question is: how to download and install the languages? The script that I posted add the language but it doens' perform the rest. Do you know how to conclude and to add a specific language for the Text To Speech? – orecchione bruno – 2019-01-23T13:18:44.523

I checked what is Background Intelligent Transfer Service (BITS) is, and I see that is an engine to update the system. So I guess that now I must find the way to order to BITS-transfer that it must download the TTS language. Any suggestion :) – orecchione bruno – 2019-01-23T14:27:57.057