Skip to content

Ship the install scripts in scripts/ so cimipkg packages create the Start menu shortcut - #14

Merged
rodchristiansen merged 1 commit into
mainfrom
fix/start-menu-shortcut
Oct 7, 2026
Merged

rodchristiansen merged 1 commit into
mainfrom
fix/start-menu-shortcut

Conversation

@rodchristiansen

Copy link
Copy Markdown
Contributor

Problem

cimipkg packages a csharpDialog release from csharpdialog-<arch>.zip as the payload plus build-info.yaml and scripts/ read from the repository at the release tag. The repository had no scripts/ folder; the postinstall existed only as a string inside build.ps1. A machine installed from a cimipkg package therefore never got:

  • the all-users Start menu shortcut for Managed Notifications Dialog.exe
  • the install folder on the machine PATH
  • the ProgramData\ManagedNotifications ACLs

Confirmed on a test VM: the GUI was installed but had no Start menu entry.

Change

  • scripts/postinstall.ps1 is now the single copy. It adds the install folder to the machine PATH, creates %ProgramData%\Microsoft\Windows\Start Menu\Programs\Managed Notifications Dialog.lnk pointing at the GUI exe with the exe as its icon, and applies the ManagedNotifications ACLs. Each step is idempotent and wrapped so a failure is reported but never fails the install; the script exits 0.
  • scripts/uninstall.ps1 removes the shortcut and the PATH entry. ProgramData is kept, as the MSI does.
  • build.ps1 stages scripts/*.ps1 into its .pkg instead of generating its own postinstall, so the two cannot drift.
  • release.yml fails the release if build-info.yaml or either script is missing at the tag, or if a zip lacks dialog.exe or Managed Notifications Dialog.exe.

Verification

  • All three PowerShell files parse cleanly (Parser::ParseFile, 0 errors).
  • CI build and tests run on this PR.

…tart menu shortcut

cimipkg packages a release from the release zip plus build-info.yaml and scripts/
read from the repository at the tag. The repository had no scripts/ folder: the
postinstall lived only inline in build.ps1, so packages built that way never got
the Managed Notifications Dialog Start menu shortcut, the PATH entry or the
ManagedNotifications ACLs.

scripts/postinstall.ps1 is now the one copy. It adds the install folder to the
machine PATH, creates the all-users Start menu shortcut with the exe as its icon,
and locks down ProgramData\ManagedNotifications. Each step is idempotent and
non-fatal. scripts/uninstall.ps1 removes the shortcut and the PATH entry.
build.ps1 stages these files into its .pkg instead of generating its own, and the
release workflow fails if the scripts are missing or the zip lacks either exe.
@rodchristiansen
rodchristiansen merged commit 7dfd4b1 into main Oct 7, 2026
1 check passed
@rodchristiansen
rodchristiansen deleted the fix/start-menu-shortcut branch October 7, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant