Skip to content

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

@sonarqubecloud
Copy link

@Nonary Nonary deleted the service_install_fix branch August 15, 2025 20:27
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