Sunshine
Sunshine copied to clipboard
fix(installer): preserve start type during installs
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
autoon fresh installs. - Starts the service only if the preserved mode isn’t disabled.
- Reads a marker file written by the uninstaller and re-creates the service with that start-type; defaults to
-
uninstall-service.bat
- Detects the current start-type (or the legacy
sunshinesvc) and writes it to%TEMP%\sunshine_start_mode.txtbefore deletion.
- Detects the current start-type (or the legacy
-
windows.cmake
- Removes installation of the obsolete
autostartfolder and call toautostart-service.bat.
- Removes installation of the obsolete
- autostart-service.bat – Deleted (logic folded into the installer scripts).
Screenshot
Not applicable – no UI changes.
Issues Fixed or Closed
- Closes #3469
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature
- [ ] Breaking change
- [ ] Dependency update
- [ ] Documentation update
- [ ] Repository update
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated the in-code documentation blocks for new or existing scripts
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code