Skip to content

Let the installer close a running OpenHaze - #13

Merged
jay739 merged 1 commit into
mainfrom
fix/installer-running-app
Nov 9, 2026
Merged

jay739 merged 1 commit into
mainfrom
fix/installer-running-app

Conversation

@jay739

@jay739 jay739 commented Nov 9, 2026

Copy link
Copy Markdown
Owner

What

  • The exe now has a title, product, company and copyright, so Setup's "applications are using files" list says "OpenHaze" instead of a blank line.
  • OpenHaze's hidden hotkey window answers Windows' close request (WM_QUERYENDSESSION / WM_ENDSESSION) by exiting through the normal cleanup. Restart Manager, which Setup uses, only asks top-level windows, and that window is one. Logoff is now clean as well.
  • installer.iss uses CloseApplications=force as a backstop and hides "Do not close the applications".
  • Replaces the em dashes in OpenHaze.cs and NativeMethods.cs, including the tray tooltip and the About text.

Why

Upgrading 0.2.1 to 0.2.2 over a running copy listed a blank entry, "Automatically close" failed ("Setup was unable to automatically close all applications"), and the install then stopped with "DeleteFile failed; code 5. Access is denied." A per-user install cannot replace a running exe or defer that to a restart, so "Do not close" could only end in the same error. Forcing the close loses nothing, because settings are saved on every change.

How it was tested

  • Asked Restart Manager to close each build politely, the way Setup does first: the installed 0.2.x exe reported the name ' ' and refused (RmShutdown 351, still running); this build reported OpenHaze, accepted (0) and exited with code 0.
  • Built with the bundled csc.exe, no warnings.
  • installer.iss compiles in this PR's Windows job; Inno Setup is not installed locally. The real upgrade over a running copy is tracked as B-1 in BACKLOG.md.

Upgrading over a running copy stopped on Setup's "applications are using
files" page with a blank entry, and "Automatically close" then failed with
"DeleteFile failed; code 5". Three causes, three fixes:

- The exe had no file description, so Windows had no name to show. It now
  carries a title, product, company and copyright.
- OpenHaze ignored the close request that Restart Manager sends to every
  top-level window. The hidden hotkey window now answers WM_QUERYENDSESSION
  and exits through the normal cleanup on WM_ENDSESSION, which also makes
  logoff clean.
- installer.iss uses CloseApplications=force as a backstop, which loses
  nothing because settings are saved on every change, and hides "Do not close
  the applications", since a per-user install can only fail on that path.

Also replaces the em dashes in OpenHaze.cs and NativeMethods.cs.
@jay739
jay739 merged commit 6c7fd35 into main Nov 9, 2026
3 checks passed
@jay739
jay739 deleted the fix/installer-running-app branch November 9, 2026 22:18
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