Auto-update

Once a product is installed, its new versions have to reach the computers it is on. Cobalt Installer puts a small Update.exe beside the program. It reads a file each build writes, sees there is a newer version, shows what is new in it, downloads it, checks that it is exactly the file you published and that it is signed by you, and installs it over the old one with the same answers. You only put two files on your site.

7 min read
In the app: ? next to the title of Auto-update opens this page.

How it works

  1. The build writes Product.updates.json beside the setup: the version, the setup's file name, its size and SHA-256, the date, and what is new. The versions the last file had are kept in it.
  2. You publish the setup and the updates file in one folder on your site, or as files of a GitHub release.
  3. Update.exe — a copy of the installer's engine in the install folder, about 620 KB — reads the updates file: on a schedule, when your program asks, or when the user picks Check for updates in Start.
  4. When there is a newer version for this computer, it shows what is new, downloads the setup (going on where a broken download stopped), checks it, and runs it.
  5. The new setup updates by the rules of Version upgrades: the same folder and answers, the program closed while its files are replaced and opened again after.

The section is under Release, in Add a feature. Turn on Look for new versions on the users' computers; everything else has a value to start with.

Where the updates are

WhereWhat you giveWhat Update.exe reads
Your siteThe folder's address: https://example.com/download/https://example.com/download/Product.updates.json
GitHub ReleasesThe project: owner/projecthttps://github.com/owner/project/releases/latest/download/Product.updates.json

On a site, put the setup and the updates file in the same folder; a second address can be given, asked when the first does not answer. On GitHub, add both files to each release: GitHub gives the latest release's files at one address that never changes, so no server of your own is needed.

Only https. Over http anyone on the way — a café's Wi-Fi, a proxy — could hand out another file. For a try on your own computer, http://127.0.0.1:… and http://localhost:… are taken too.

The addresses take the project's values: https://example.com/{ProductName}/.

The updates file

{
  "product": "Tiny App",
  "id": "{6F1C2A7E-…}",
  "publisher": "Cobaltsmith",
  "versions": [
    {
      "version": "1.1.0",
      "channel": "stable",
      "date": "2026-11-10",
      "file": "TinyApp-1.1.0-Setup.exe",
      "size": 1570608,
      "sha256": "d918f79c…",
      "critical": false,
      "rollout": 100,
      "notes": { "en": "- Batch rename by a pattern\n- JPEG XL and AVIF" }
    }
  ]
}
FieldWhat it is
idThe product's code from Version upgrades: an updates file of another product is not taken.
file / urlThe setup beside the updates file, or a full address of its own.
size, sha256What the downloaded file must be, to the byte.
criticalIt can't be put off or skipped.
rolloutThe share of computers, 1–100, it is offered to.
minimumNot written by the build: the oldest version this setup can update; older ones get another version first.
notesWhat is new, by the installer's language.

The file can be changed by hand after the build: to stop a version found to be wrong (rollout lowered, or the entry taken out), or to mark it critical.

What is new

From the changelog, or written in the section. A changelog is read by its headings: the part of version 1.4.0 goes from a heading with it — ## 1.4.0, ## [1.4.0] - 2026-11-10, ### v1.4 — to the next heading as high. The file chosen is in the installer's default language; CHANGELOG.de.md beside it gives the German text, and so on. Lists, headings and bold are shown as plain lines.

When the changelog has no part for the version being built, Problems says so.

When it looks

HowWhat it is
From your programIt runs Update.exe --check --background as it starts. Twice a day at the most; a window only when there is a new version.
On a scheduleA Windows task, as the user. Off by default — see below.
Before installingAn old setup asks first whether there is a newer version than itself, 3 s at the most, and offers it.
Check for updatesAn item in Start beside the program's shortcut, when asked for.

The schedule has what Task Scheduler has:

RepeatFor example
Every N daysevery day; every 3rd day
Weekdays, every N weeksevery Monday; Tuesdays and Thursdays; Fridays every 2nd week
Days of the monththe 10th; the 1st and the 15th; the last day, whatever its number
A weekday's place in the monththe 2nd Tuesday; the last Friday
Monthsany of them: every month, or only March, June, September, December

Then the time, by the computer's clock, and a spread — none, 15 minutes, an hour, four hours — over which each computer's time falls at random, so a thousand of them don't come to your server in the same minute. A time missed while the computer was off comes as soon as it is on. At the user's sign-in too adds a look two minutes after each sign-in. Under the schedule the editor shows its next three times — the same Windows will keep.

Why the schedule is off by default

A task that starts a program at sign-in or at set times is also how malware keeps itself on a computer. Microsoft Defender judges such a task by who signed the program: while the setup is unsigned, or signed by a certificate Windows does not trust (one made by yourself), it is likely to put Update.exe in quarantine and delete the task. With a code signing certificate from a known authority this does not happen. Until then, let your program run Update.exe --check --background as it starts: nothing stays on the computer to look like that.

What it does with a new version

ChoiceWhat the user sees
AskA window: the version, what is new, its size and date; Update, Remind me tomorrow, Skip this version. A critical version has Update only.
Install by itselfNothing until it is done: downloaded and installed quietly while the program is closed, then a notification. Installed for everyone, a second task runs as SYSTEM on the schedule, so no one is asked for rights.
Only tellA Windows notification; the window opens when it is clicked.

This version — said of the version being built, in the updates file:

The check

What is downloaded is installed only if all of this holds:

  1. Its size and SHA-256 are those in the updates file.
  2. It is signed by the same publisher as Update.exe itself. The same publisher, not the same certificate: certificates are renewed every year, the company's name stays.
  3. Windows trusts the signature, revoked certificates included.

It can't be turned off. While the setup is not signed, only the SHA-256 is checked — and a setup changed on the server together with the updates file would go through; Problems says so.

Administrators and your program

CommandWhat it does
setup.exe /S UPDATES=0Installs with updates off on that computer; the next versions keep it so. UPDATES=1 turns them on again.
HKLM\Software\Policies\Publisher\Product Updates = 0Off on every computer the policy reaches.
HKLM\Software\Policies\Publisher\Product UrlAnother updates file: the company's own server, with the versions it has tried.
Update.exe --check --backgroundFor your program as it starts: twice a day at the most, a window only when there is a new version.
Update.exe --checkCheck for updates in your program's menu: the window, or the newest version when there is none.
Update.exe --check --quietNo window. Exit code 0 — none newer, 1 — there is one (a line of JSON about it on the output), 2 — no network.
Update.exe --installDownloads, checks and installs the newest version with no window.
// C#: Help → Check for updates
var update = Path.Combine(AppContext.BaseDirectory, "Update.exe");
Process.Start(update, "--check");

Update.exe writes what it did to %TEMP%\Product Update.log.