You don't need a general-purpose language if you can ship a compiled program – you're already writing a program in the first place; use the same method to write an Updater.exe alongside the main App.exe. For example, as you said you write Lua and bundle it with a runtime to make an .exe file, so you can also do the same to make an updater in Lua.
As for built-ins, PowerShell would be your best option, generally. It runs on .NET CLR and exists somewhere in-between Bash and C# – the language is built mainly for "shell script" type of work, but you have full access to all standard .NET classes (as well as COM and WMI/CIM), and can even use inline C# code via Add-Type
if you end up needing FFI (P/Invoke).
There is a built-in HTTP client available as Invoke-RestMethod
(irm
) and a slightly different HTTP client under Invoke-WebRequest
(iwr
); one of them can parse JSON and XML. To display a message, you can call .NET WinForms using:
[System.Windows.Forms.MessageBox]::Show("Hello!")
All reasonably recent Windows versions include "Windows PowerShell" version 5. It lacks some niceties, e.g. some options for Invoke-WebRequest are missing, but otherwise is nearly the same as modern PowerShell 7.
The only downside is that PowerShell scripts always show a console window; there is so far no equivalent of pythonw.exe
or similar. (It's a long story.)
All other options are slightly worse:
- Compiled .exe that uses WinHTTP (or statically linked to libcurl). You can compile a Windows .exe from Linux using Mingw64.
- VBScript. It's officially "deprecated" now, but it still ships with all Windows versions because of things like
slmgr.vbs
. Some corporate systems might disable it, but they're equally likely to disable PowerShell.
- Batch script that uses various arcana to unpack an embedded binary such as curl.exe into %TEMP% (as seen in some not-entirely-legal tools).
- Batch script that uses the
curl.exe
that comes built-in with Windows 10. (I would use Nirsoft's nircmd.exe for displaying the popup message, but nothing stops you from echo
-ing a VBScript into %TEMP%, or something else.)