Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Jan 3, 2026

Summary

Refines the 7zip manifest to improve accuracy, reliability of context-menu registration, and clarity of metadata, while aligning the structure with current Scoop best practices.

Related issues or pull requests

Changes

  • Replace simple license string with structured SPDX identifiers and license URL
  • Revise notes entry to provide clearer instructions for context-menu registration
  • Reworke post_install to:
    • unify handling of .reg templates
    • support both per-user (HKCU) and global (HKLM) contexts via $global
    • replace {{7zip_dir}} placeholder in templates
    • ensure correct escaping and encoding
  • Add Start Menu shortcuts grouping under 7-Zip folder
  • Add shortcut to 7-zip.chm help file
  • Add uninstaller.script to import uninstall-context.reg automatically on uninstall

Notes

; Effective only when configured under the HKEY_CURRENT_USER hive.

[HKEY_CURRENT_USER\Software\7-Zip\Options]
"CascadedMenu"=dword:00000001
"MenuIcons"=dword:00000001

Testing

The test results are as follows:
┏[ ~]
└─> scoop install Unofficial/7zip
Installing '7zip' (25.01) [64bit] from 'Unofficial' bucket
Loading 7z2501-x64.msi from cache.
Checking hash of 7z2501-x64.msi ... ok.
Extracting 7z2501-x64.msi ... done.
Linking D:\Software\Scoop\Local\apps\7zip\current => D:\Software\Scoop\Local\apps\7zip\25.01
Creating shim for '7z'.
Creating shim for '7zG'.
Making D:\Software\Scoop\Local\shims\7zg.exe a GUI binary.
Creating shim for '7zFM'.
Making D:\Software\Scoop\Local\shims\7zfm.exe a GUI binary.
Creating shortcut for 7-Zip\7-Zip File Manager (7zFM.exe)
Creating shortcut for 7-Zip\7-Zip Help (7-zip.chm)
Persisting Codecs
Persisting Formats
Running post_install script...done.
'7zip' (25.01) was installed successfully!
Notes
-----
To register the context menu entry, please execute the following command:
reg import "D:\Software\Scoop\Local\apps\7zip\current\install-context.reg"
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

All changes look good.

Wait for review from human collaborators.

7zip

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

All changes look good.

Wait for review from human collaborators.

7zip

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

7zip

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

7zip

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

"uninstaller": {
"script": [
"if ($cmd -eq 'uninstall') { reg import \"$dir\\uninstall-context.reg\" *> $null }",
"Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue",
Copy link
Member

Choose a reason for hiding this comment

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

Should we always uninstall the association and stop the explorer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uninstall the association

The context menu is unregistered only when $cmd is set to uninstall. The logic may need to be adjusted when no_junction is true, but since most manifests do not account for this case, I do not believe a change is necessary at this time.

stop the explorer

Because 7-Zip uses CLSIDs when registering context menu entries, updates or uninstalls may fail due to files being in use if explorer is not stopped. As most users who install 7-Zip are likely to enable the context menu integration, I believe it is unnecessary to explicitly check whether the context menu is registered, and stopping explorer directly is sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally, if the user has registered file associations, uninstalling via Scoop does not currently remove the associated settings. Should .reg files be provided to manage and clean up file associations?

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.

2 participants