Skip to content

fix(installer): preserve start type during installs #3867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nonary
Copy link

@Nonary Nonary commented May 11, 2025

Description

Preserve whatever start-type (auto, delayed-auto, demand, or disabled) the Windows
SunshineService already uses when the program is upgraded or re-installed.
Previously every update reset the service to Automatic.

Key Points

  • Vibe Coding – Most of the code changes and this PR text were AI-generated and then peer-reviewed/tweaked by humans for accuracy and style.
  • install-service.bat
    • Reads a marker file written by the uninstaller and re-creates the service with that start-type; defaults to auto on fresh installs.
    • Starts the service only if the preserved mode isn’t disabled.
  • uninstall-service.bat
    • Detects the current start-type (or the legacy sunshinesvc) and writes it to %TEMP%\sunshine_start_mode.txt before deletion.
  • windows.cmake
    • Removes installation of the obsolete autostart folder and call to autostart-service.bat.
  • autostart-service.bat – Deleted (logic folded into the installer scripts).

Screenshot

Not applicable – no UI changes.

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Dependency update
  • Documentation update
  • Repository update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in-code documentation blocks for new or existing scripts

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.

Windows service start type gets overwritten on Sunshine updates
1 participant