I just ran the script locally, and after selecting the language files, the window closed.
Okay, I just found the files downloaded by the script. I just compared the installation with a recent backup, and the script placed the files:
Microsoft-Windows-Client-LanguagePack-Package_en-us-amd64-en-us.esd
Microsoft-Windows-LanguageFeatures-Basic-en-us-Package-amd64.cab
Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package-amd64.cab
Microsoft-Windows-LanguageFeatures-OCR-en-us-Package-amd64.cab
Microsoft-Windows-LanguageFeatures-Speech-en-us-Package-amd64.cab
Microsoft-Windows-LanguageFeatures-TextToSpeech-en-us-Package-amd64.cab
in C:\Windows\System32. So, I'm guessing that when I restart it, it detects these files already present in C:\Windows\System32 and closes.
I'll move these files elsewhere and see what happens.