# Changelog (Windows client)

Version is in `VERSION.md`. The report data version it produces is `v3.8.0`, the same as the Unix client. The newest entry is first.

## Unreleased

- New `dsEdit.ps1` 1.0.0 and `configure.ps1` (bug 216), the Windows config editor: an interactive browse-and-edit navigator for JSON and INI files so technicians cannot produce syntax errors, plus `-Set`, `-Add`, `-Remove` and `-Show` for scripts. It takes any file as its first parameter, so a desktop shortcut can open a specific file; `-Pause` keeps the window open, and a file the user cannot open (the locked `C:\ProgramData\camp`) makes it start an elevated copy (UAC). Own JSON serializer (no `ConvertTo-Json` depth truncation or `\u003c` escapes), written to a temp file, verified, then `[IO.File]::Replace` with a `.bak` that keeps the ACL; known-key type check for the client config. No YAML, no dsMerge. `install.ps1` 1.1.1 installs both files and has `-DesktopShortcut`, which creates "CAMP sysinfo config" and "CAMP sysinfo update" shortcuts on the installing user's desktop (`-ShortcutAllUsers` for the public desktop), flagged Run as administrator because an unelevated user cannot read the locked program directory (found on the first beta host: no UAC prompt, window closed); `-Uninstall` removes them. Spec section 7.11; tests in `t/windows/run_tests.ps1`.
- `sysinfo_update.ps1` 1.2.0 mimics the Unix updater's checksum check: it reads the published `.sha256` first and compares it with `update_installed.sha256` in the config directory (a missing record counts as not matched). Equal: `nochange`, the zip is not downloaded. Different: download, verify, install whatever the version says, then record the new checksum. Version numbers are compared only when no checksum is published. `-Check` reports an update without downloading. `install.ps1` 1.1.1 deletes the record on every install, so a hand install is never mistaken for the recorded release.
- `sysinfo_update.ps1` 1.2.0: new `-Pause` switch for a desktop shortcut. Not elevated, it re-launches itself elevated (UAC prompt); at the end it waits for Enter so the result can be read; a failure to load the client is reported instead of the window closing. Scheduled use is unchanged (no `-Pause`).

## 1.1.0 - 2026-10-25 (pending: uncommitted, not yet tagged)

Updater for the Windows client (section 7.10 of `../Documentation/Spec.md`).

- New `sysinfo_update.ps1`: fetches the release zip from config `update.url`, verifies `update.sha256_url`, unpacks safely, compares versions without running the download, and runs the new `install.ps1 -Quiet`; `-Check`, `-Force`, `-RequireChecksum`, `-Url`, `-Sha256Url`, `-Quiet`. Windows uses a `.zip`, Unix a `.tgz`.
- `install.ps1` installs it, and `-UpdateUrl` / `-UpdateSha256Url` set the config's `update` keys (new config, or with `-Configure`). The seed example gains an `update` object.
- `install.ps1` renames the old program directory to `sysinfo_client.old` instead of deleting it first, and restores it if the copy fails; a locked directory now fails cleanly with nothing changed (found testing the updater: a shell sitting in the directory left a half-deleted client). The updater also moves out of the program directory before running the installer.
- Client version raised to 1.1.0 so the updater can see a new release; no other client change.
- Tests: pure-function and zip checks everywhere, end-to-end `-Check` runs on Windows.

## 1.0.0 - 2026-10-18 (pending: uncommitted, not yet tagged)

First version, written for bug 211 (PowerShell 5.1; the contract is section 7 of `../Documentation/Spec.md`).

- `sysinfo_client.ps1`: config, `server.info`, sensor runner (child PowerShell, timeout, exit codes as the Unix sensors), JSON report, transports, `unsent.json` on failure.
- `lib/SysinfoSensor.psm1`, the sensors and `transports/upload_http.ps1`.
- `install.ps1`: zip install with ACL hardening, scheduled task, seed file, `-Configure`, `-DryRun`, and `-ServerInfo <path>` (or a `server.info` beside the script) to install a host identity file from any folder into the locked `C:\ProgramData\camp`.
- Documentation in `README.md`; tests in `../t/windows/` (99 passed, 5 skipped under `pwsh` on Linux).
