Skip to content

everything: Update checkver, fix persistence & uninstaller logic#17079

Open
SorYoshino wants to merge 3 commits intoScoopInstaller:masterfrom
SorYoshino:everything
Open

everything: Update checkver, fix persistence & uninstaller logic#17079
SorYoshino wants to merge 3 commits intoScoopInstaller:masterfrom
SorYoshino:everything

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Jan 23, 2026

Summary

Refactors everything manifest to ensure reliable data persistence, enhance uninstaller safety with registry cleanup, and modernize version detection.

Related issues or pull requests

Changes

  • Metadata Refinement: Updated description and structured the license field.
  • Improve Installation Scripting:
    • Add a check for existing configuration before initializing a default one.
    • Implement manual Copy-Item in pre_install and pre_uninstall for *.ini, *.db, *.csv, etc.
    • Optimize post_install to dynamically process registry scripts with correct escaping and encoding (unicode).
  • Relocate & Enhance Uninstaller Logic:
    • Move process/service termination to the uninstaller block for lifecycle compliance.
    • Registry Cleanup: Add automatic import of uninstallation registry files (un*.reg) during the uninstall phase.
    • Robust Service Detection: Implement a dual-path logic for service detection (using Get-Service for PS 6+ and Get-CimInstance for PS 5.1) with path-based regex validation to ensure only the Scoop-managed service is modified.
  • Modernize Checkver: Switch the update source to Changes.txt for more accurate version tracking.

Notes

  • Some links related to user data are as follows:
  • At present, the only script used to extend everything is (un)install-context.reg. However, additional scripts could be added in the future, such as those for startup registration or protocol handling. I will submit a separate PR to add them when I have the time. Therefore, I have proactively updated the related logic to use Get-ChildItem to dynamically retrieve the names of .reg files.
  • In Windows, service names are unique. Therefore, I believe that once the relevant services matching the criteria are detected, it is sufficient to stop them and remove only the services created by the application, rather than deleting all related services indiscriminately.

Testing

The test results are as follows:
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ develop ≡]
└─> .\checkver.ps1 -App everything -Dir 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket' -f
everything: 1.4.1.1032 (scoop version is 1.4.1.1032)
Forcing autoupdate!
Autoupdating everything
DEBUG[1769185142] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1769185142] $substitutions.$preReleaseVersion             1.4.1.1032
DEBUG[1769185142] $substitutions.$version                       1.4.1.1032
DEBUG[1769185142] $substitutions.$basenameNoExt                 Everything-1.4.1.1032.x64
DEBUG[1769185142] $substitutions.$match1                        1.4.1.1032
DEBUG[1769185142] $substitutions.$matchHead                     1.4.1
DEBUG[1769185142] $substitutions.$baseurl                       https://www.voidtools.com
DEBUG[1769185142] $substitutions.$url                           https://www.voidtools.com/Everything-1.4.1.1032.x64.zip
DEBUG[1769185142] $substitutions.$matchTail                     .1032
DEBUG[1769185142] $substitutions.$cleanVersion                  1411032
DEBUG[1769185142] $substitutions.$majorVersion                  1
DEBUG[1769185142] $substitutions.$dashVersion                   1-4-1-1032
DEBUG[1769185142] $substitutions.$dotVersion                    1.4.1.1032
DEBUG[1769185142] $substitutions.$buildVersion                  1032
DEBUG[1769185142] $substitutions.$underscoreVersion             1_4_1_1032
DEBUG[1769185142] $substitutions.$patchVersion                  1
DEBUG[1769185142] $substitutions.$urlNoExt                      https://www.voidtools.com/Everything-1.4.1.1032.x64
DEBUG[1769185142] $substitutions.$minorVersion                  4
DEBUG[1769185142] $substitutions.$basename                      Everything-1.4.1.1032.x64.zip
DEBUG[1769185142] $hashfile_url = https://www.voidtools.com/Everything-1.4.1.1032.sha256 -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Searching hash for Everything-1.4.1.1032.x64.zip in https://www.voidtools.com/Everything-1.4.1.1032.sha256
DEBUG[1769185143] $filenameRegex = ([a-fA-F0-9]{32,128})[\x20\t]+.*Everything-1\.4\.1\.1032\.x64\.zip(?:\s|$)|Everything-1\.4\.1\.1032\.x64\.zip[\x20\t]+.*?([a-fA-F0-9]{32,128}) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:101:13
Found: 698df475ec44e638f66f1b6a32d28fea613cec78d3b6310e6abe53431eeb940c using Extract Mode
DEBUG[1769185143] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1769185143] $substitutions.$preReleaseVersion             1.4.1.1032
DEBUG[1769185143] $substitutions.$version                       1.4.1.1032
DEBUG[1769185143] $substitutions.$basenameNoExt                 Everything-1.4.1.1032.ARM64
DEBUG[1769185143] $substitutions.$match1                        1.4.1.1032
DEBUG[1769185143] $substitutions.$matchHead                     1.4.1
DEBUG[1769185143] $substitutions.$baseurl                       https://www.voidtools.com
DEBUG[1769185143] $substitutions.$url                           https://www.voidtools.com/Everything-1.4.1.1032.ARM64.zip
DEBUG[1769185143] $substitutions.$matchTail                     .1032
DEBUG[1769185143] $substitutions.$cleanVersion                  1411032
DEBUG[1769185143] $substitutions.$majorVersion                  1
DEBUG[1769185143] $substitutions.$dashVersion                   1-4-1-1032
DEBUG[1769185143] $substitutions.$dotVersion                    1.4.1.1032
DEBUG[1769185143] $substitutions.$buildVersion                  1032
DEBUG[1769185143] $substitutions.$underscoreVersion             1_4_1_1032
DEBUG[1769185143] $substitutions.$patchVersion                  1
DEBUG[1769185143] $substitutions.$urlNoExt                      https://www.voidtools.com/Everything-1.4.1.1032.ARM64
DEBUG[1769185143] $substitutions.$minorVersion                  4
DEBUG[1769185143] $substitutions.$basename                      Everything-1.4.1.1032.ARM64.zip
DEBUG[1769185143] $hashfile_url = https://www.voidtools.com/Everything-1.4.1.1032.sha256 -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Searching hash for Everything-1.4.1.1032.ARM64.zip in https://www.voidtools.com/Everything-1.4.1.1032.sha256
Could not find hash in https://www.voidtools.com/Everything-1.4.1.1032.sha256
Downloading Everything-1.4.1.1032.ARM64.zip to compute hashes!
Loading Everything-1.4.1.1032.ARM64.zip from cache
Computed hash: 23dca1a64574bf30c9988bbaf5f1d201a0ec7ee9a15e12270ae92a52183cccc8
Writing updated everything manifest


# The currently installed `Everything` does not have the service installed,
# but the globally installed `Everything` does have the service installed.

┏[ ~]
└─> Test-Administrator
False

┏[ ~]
└─> scoop install Unofficial/everything
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
"D:\Software\Scoop\Global\apps\Everything\current\everything.exe" -svc

┏[ ~]
└─> scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Unlinking D:\Software\Scoop\Local\apps\everything\current
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> scoop uninstall everything -p
Uninstalling 'everything' (1.4.1.1032).
Running pre_uninstall script... Done.
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     17     3.45      24.48       0.09   15864   1 everything

Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Everything.lnk
Unlinking D:\Software\Scoop\Local\apps\everything\current
Removing older version (_1.4.1.1032.old).
Removing persisted data.
'everything' was uninstalled.


# The currently installed `Everything` has installed a service.

┏[ ~]
└─> Test-Administrator
False

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
"D:\Software\Scoop\Local\apps\everything\current\everything.exe" -svc

┏[ ~]
└─> scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script...
[ERROR]  everything requires admin rights to update.

┏[ ~]
└─[ Error, check your command]> sudo scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     11     1.93      11.59       0.03    9484   0 everything

Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Unlinking D:\Software\Scoop\Local\apps\everything\current
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> sudo scoop uninstall everything -p
Uninstalling 'everything' (1.4.1.1032).
Running pre_uninstall script... Done.
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     17     3.39      24.46       0.17   10004   1 everything
     11     2.00      11.50       0.02   10256   0 everything
     23   126.90     150.52      12.55   18764   1 everything

Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Everything.lnk
Unlinking D:\Software\Scoop\Local\apps\everything\current
Removing older version (_1.4.1.1032.old).
Removing persisted data.
'everything' was uninstalled.

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
Get-Service: Cannot find any service with service name 'Everything'.
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • License now includes a direct reference URL.
    • Structured version-checking added for automatic update detection.
    • Explicit uninstaller declaration introduced with scripted cleanup behavior.
    • Persistence declarations added to retain logs and HTTP server state.
  • Refactor

    • Install/uninstall flows reworked for improved registration handling, path/template handling, encoding, and persistence behavior.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Walkthrough

Manifest restructured: license changed to an object; added persist, uninstaller, and structured checkver; install/uninstall PowerShell logic rewritten for architecture-aware flows, templated registry scripting, encoding changes, and persistence copy/restore behavior.

Changes

Cohort / File(s) Summary
Manifest metadata & public fields
bucket/everything.json
Converted license string to object with identifier and url; added persist, uninstaller (with script), and structured checkver (url + regex).
Installer/uninstaller scripts & flow
bucket/everything.json
Rewrote pre_install/post_install/pre_uninstall into templated, arch-aware PowerShell blocks; added conditional INI install, persistence copy behavior, and moved uninstall steps into public uninstaller.script.
Autoupdate / checkver
bucket/everything.json
Replaced top-level checkver string with structured block and updated autoupdate references to use the new checkver fields and templated script variables.
Scripting & encoding
bucket/everything.json
PowerShell and registry script writing changed to use templating, explicit encodings, path-handling improvements, and preserved arm64 rename behavior.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Installer as Installer (manifest scripts)
    participant FS as Filesystem
    participant Reg as Registry
    participant Updater as Updater/Checkver
    participant Uninstaller as Uninstaller (manifest)

    User->>Installer: trigger install
    Installer->>FS: extract/copy files (arch-aware), preserve arm64 names
    Installer->>FS: copy persisted files to install dir (if present)
    Installer->>Reg: generate/write registry scripts (templated, explicit encoding)
    Installer->>Updater: register checkver (url + regex)
    User->>Uninstaller: trigger uninstall
    Uninstaller->>FS: copy persisted files out / restore, remove install files
    Uninstaller->>Reg: run registry removal script
    Uninstaller-->>User: uninstall complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

review-needed

Suggested reviewers

  • z-Fng

Poem

🐰 I nudged the JSON, neat and swift,
License trimmed and given a gift,
Logs tucked safe, scripts hum in tune,
Install, persist, remove by noon,
Hop — version checks arrive by noon. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary changes (checkver update, persistence fix, uninstaller logic improvements) and is specific enough for historical scanning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed PR description is comprehensive and follows the template structure with clear sections, conventional title, testing evidence, and related issue references.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 33-37: The persistence pattern list used in the ForEach-Object
loop is missing the wildcard for text files—'txt' should be '*.txt'—so update
the pattern array/string used with ForEach-Object (the block referencing
$persist_dir, Test-Path and Copy-Item) to include '*.txt' instead of 'txt' in
both occurrences (the loop that iterates over the patterns and the similar block
at lines ~60-64) so Test-Path and Copy-Item will correctly match and persist
.txt files; ensure you update the same pattern source used by the ForEach-Object
invocation that checks Test-Path -PathType Leaf and calls Copy-Item.
- Around line 99-101: The current "checkver" regex only captures the numeric
portion and drops pre-release letters (e.g., `a`/`b`), so update the "regex"
value in the checkver block to capture an optional single-letter pre-release
suffix (or broader letter sequence if needed) appended to the numeric version
(e.g., capture "1.5.0.1400a" not just "1.5.0.1400"); alternatively, if you only
want stable releases, change the logic in the checkver parsing to filter out any
captures that include a trailing letter and only accept pure numeric versions.
Make this change where the "checkver" object and its "regex" value are defined
so version detection preserves or filters pre-release suffixes as required.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 91-95: The removal step currently hardcodes the service name
('Everything') instead of using the discovered $service, which breaks named
instances; change the Remove-Service and the sc.exe delete invocation to use
$service.Name (and guard that $service is non-null) so both branches call
Remove-Service -Name $service.Name (or Start-Process -FilePath 'sc.exe'
-ArgumentList @('delete', $service.Name) ...) rather than the literal
'Everything'.
♻️ Duplicate comments (1)
bucket/everything.json (1)

99-102: Regex doesn't capture pre-release suffixes (alpha/beta).

Per Changes.txt format, pre-release versions use suffixes like 1.5.0.1400a (alpha) or 1.4.1.867b (beta). The current regex ([\\d.]+) only captures the numeric portion, potentially causing version detection issues when pre-release builds are present in the changelog.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino SorYoshino marked this pull request as draft February 4, 2026 11:59
@SorYoshino SorYoshino marked this pull request as ready for review February 4, 2026 12:17
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino
Copy link
Contributor Author

/verify

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 87-95: The service lookup fails on PowerShell 6+ because
Get-Service does not expose BinaryPathName cross-platform; update the branch
that currently uses Get-Service to instead call Get-CimInstance -ClassName
Win32_Service (same as the else branch) and then create the computed property
for BinaryPathName from PathName (or change the subsequent match to use PathName
instead of BinaryPathName) so that $services, $service and the $path_regex match
work consistently across PS versions; ensure you still use $base_service_name
for the initial name filter and preserve -ErrorAction SilentlyContinue.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino
Copy link
Contributor Author

The test failure occurs because Everything-$version.sha256 does not contain the hash for Everything-$version.ARM64.zip.

Since the author may provide the ARM64 hash in Everything-$version.sha256 in the future, or may stop providing the ARM64 build altogether, I believe it is unnecessary to move the hash object into the 64bit and 32bit sections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant