Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Dec 22, 2025

Summary

Refactors the vscode manifest to improve portability, data migration, and maintainability.

Separately, the registry (.reg) scripts have been updated to better align with entries and behavior observed in the official Visual Studio Code installer.

Related issues or pull requests

Changes

  • Refactore the manifest to improve:
    • Data and extension migration
    • Maintainability and consistency with Scoop conventions
  • Update registry (.reg) scripts based on entries generated by the official VS Code installer, ensuring:
    • Compatibility with Windows file association and shell integration mechanisms
  • Refactore notes to better reflect available registry integration options
  • Improve post_install logic to dynamically apply registry templates and support both user-level and global installs
  • Improve uninstaller behavior to properly unregister registry entries
  • Update checkver to rely on productVersion for more reliable version detection

Notes

  • Add a pre_install script to ensure extension paths are adjusted correctly. The rationale behind this logic is as follows:
    • Based on testing, only the most recently installed extension contains the _sep, fsPath, and external fields within the location object in extensions.json.
    • This behavior is easy to verify: after installing extension A and then extension B, extension A’s location object no longer contains the above fields, and a uuid field is added to its identifier object, with the value equal to metadata.id.
    • When extension B is uninstalled, the application only removes B’s entry from extensions.json; the previously modified metadata for extension A remains unchanged.
    • The pre_install script intentionally emulates this behavior. It assumes that the application can derive the other two path representations from location.path alone (as evidenced by the current structure of extensions.json). Updating all three path variants would introduce unnecessary complexity, so the script limits itself to normalizing location.path only, which is sufficient and consistent with observed behavior.
  • The file association registrations in install-associations.reg are derived from the official installer. In addition to the existing associations, this update adds support for .json5, .jsonc, .zshrc, and other related file types.
  • The contents of install-context.reg are also based on the official installer. The only difference is that the official installer registers the relevant values as REG_EXPAND_SZ, whereas this PR uses REG_SZ. Both registry value types function correctly in this context.
  • The current naming of install-github-integration.reg is potentially misleading. It has therefore been renamed to register-installed-program.reg, and the corresponding entries in the notes field have been updated accordingly.

Testing

The test results are as follows:
┏[ ~]
└─> jq '
   map({
     identifier,
     location: (
       .location
       | with_entries(
           if (.value | type) == "string"
           then .value |= gsub("<username>"; "USERNAME")
           else .
           end
         )
       )
   })
' "$HOME\.vscode\extensions\extensions.json"
[
  {
    "identifier": {
      "id": "arthurlobo.easy-codesnap",
      "uuid": "74ee6421-4ae5-4bdc-b642-afa6fd1a2522"
    },
    "location": {
      "$mid": 1,
      "path": "/c:/Users/USERNAME/.vscode/extensions/arthurlobo.easy-codesnap-1.36.1",
      "scheme": "file"
    }
  },
  {
    "identifier": {
      "id": "usernamehw.errorlens"
    },
    "location": {
      "$mid": 1,
      "fsPath": "c:\\Users\\USERNAME\\.vscode\\extensions\\usernamehw.errorlens-3.26.0",
      "_sep": 1,
      "external": "file:///c%3A/Users/USERNAME/.vscode/extensions/usernamehw.errorlens-3.26.0",
      "path": "/c:/Users/USERNAME/.vscode/extensions/usernamehw.errorlens-3.26.0",
      "scheme": "file"
    }
  }
]

┏[ ~]
└─> scoop install Unofficial/vscode
Installing 'vscode' (1.107.1) [64bit] from 'Unofficial' bucket
Loading dl.7z from cache.
Checking hash of dl.7z ... ok.
Extracting dl.7z ... done.
Running pre_install script...done.
Linking D:\Software\Scoop\Local\apps\vscode\current => D:\Software\Scoop\Local\apps\vscode\1.107.1
Creating shortcut for Visual Studio Code (Code.exe)
Adding D:\Software\Scoop\Local\apps\vscode\current\bin to your path.
Persisting data
Running post_install script...INFO  [Portable Mode] Migrating user data to 'D:\Software\Scoop\Local\apps\vscode\current\data'...
INFO  [Portable Mode] Migrating argv.json to 'D:\Software\Scoop\Local\apps\vscode\current\data'...
INFO  [Portable Mode] Migrating extensions to 'D:\Software\Scoop\Local\apps\vscode\current\data'...
INFO  Adjusting path in extensions file...
done.
'vscode' (1.107.1) was installed successfully!
Notes
-----
To register file associations, please execute the following command:
- `reg import "D:\Software\Scoop\Local\apps\vscode\current\register-file-associations.reg"`
To register the context menu entry, please execute the following command:
- `reg import "D:\Software\Scoop\Local\apps\vscode\current\register-context-menu.reg"`
To register the installed program entry (required for integration with other applications), please execute the following command:
- `reg import "D:\Software\Scoop\Local\apps\vscode\current\register-installed-program.reg"`

┏[ ~]
└─> jq 'map({ identifier, location })' "D:\Software\Scoop\Local\apps\vscode\current\data\extensions\extensions.json"
[
  {
    "identifier": {
      "id": "arthurlobo.easy-codesnap",
      "uuid": "74ee6421-4ae5-4bdc-b642-afa6fd1a2522"
    },
    "location": {
      "$mid": 1,
      "path": "/D:/Software/Scoop/Local/apps/vscode/1.107.1/data/extensions/arthurlobo.easy-codesnap-1.36.1",
      "scheme": "file"
    }
  },
  {
    "identifier": {
      "id": "usernamehw.errorlens",
      "uuid": "9d8c32ab-354c-4daf-a9bf-20b633734435"
    },
    "location": {
      "$mid": 1,
      "path": "/D:/Software/Scoop/Local/apps/vscode/1.107.1/data/extensions/usernamehw.errorlens-3.26.0",
      "scheme": "file"
    }
  }
]
  • 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

    • Portable mode support: manifest options for pre/post-install hooks, path persistence, shortcuts, and env path additions.
    • Unified context-menu and file-association entries for VSCode; simplified registration commands.
    • Update metadata parsing switched to productVersion.
  • Chores

    • Install/uninstall flows revised to migrate user data and extensions to portable locations and standardize uninstaller/registration behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

Refactors VS Code Windows manifest and scripts to add portable-mode orchestration (pre_install/post_install), broaden manifest surface (env_add_path, shortcuts, persist), normalize extension paths, and consolidate Windows registry context/association keys under a VSCode namespace; also updates checkver.jsonpath to use productVersion.

Changes

Cohort / File(s) Summary
Manifest Configuration
bucket/vscode.json
Added public fields: env_add_path, pre_install, post_install, shortcuts, persist; normalized description/homepage/license strings; added pre/post-install orchestration for portable-mode (migrate extensions/user data, registry/script generation); updated uninstall to include unregister-installed-program.reg; changed checkver.jsonpath to $.productVersion; aligned autoupdate URLs/metadata for x64/arm64.
Context Menu Installation
scripts/vscode/install-context.reg
Replaced disparate "Open with &Code" entries with unified VSCode shell keys; standardized display names, icons and command paths to use {{vscode_dir}}\\Code.exe for File, Directory, DirectoryBackground and Drive contexts.
Program Registration
scripts/vscode/register-installed-program.reg
Converted legacy placeholders to {{vscode_dir}}; set DisplayIcon to "{{vscode_dir}}\\Code.exe",0; added HelpLink, URLInfoAbout, URLUpdateInfo; set InstallLocation to \"{{vscode_dir}}\".
File Associations Cleanup
scripts/vscode/uninstall-associations.reg
Replaced CodeOSS.* ProgIDs with VSCode.* equivalents across many extensions; consolidated/renamed per-extension blocks for uninstall-time cleanup.
Context Menu Cleanup
scripts/vscode/uninstall-context.reg
Removed old "Open with &Code" removal targets and added removal entries for new VSCode context keys under HKCU\Software\Classes for file, directory, background, and drive scopes.
Program Unregistration
scripts/vscode/unregister-installed-program.reg
Minimal representation change: uninstall key line switched to addition-style marker while content preserved (no functional change).

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Installer
    participant Manifest as "bucket/vscode.json"
    participant PreInstall as "pre_install (script)"
    participant PostInstall as "post_install (script)"
    participant Registry
    participant FS as "Filesystem (extensions/user data)"

    Installer->>Manifest: read manifest fields (env_add_path, pre_install, post_install, persist, shortcuts)
    Manifest->>PreInstall: invoke pre_install sequence
    PreInstall->>FS: detect & migrate existing extensions/user data -> portable data dir
    PreInstall->>PostInstall: emit migration plan & path mappings
    Installer->>PostInstall: run post_install
    PostInstall->>Registry: generate/write registry scripts (register/unregister, context, associations)
    PostInstall->>FS: normalize/patch extensions.json paths to portable dir
    Registry-->>Installer: registry keys created/updated
    FS-->>Installer: extensions/user data relocated
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • z-Fng

Poem

🐰 I hopped through manifests, tidy and spry,
I nudged extensions home where portable dreams lie,
Reg keys now chant "VSCode" in orderly rows,
Scripts migrate, register, and tidy what grows,
A little rabbit cheers — install, migrate, go! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: refactoring the vscode manifest and aligning registry scripts with the official installer.
Description check ✅ Passed The PR description is well-structured with clear sections covering summary, related issues, changes, implementation notes, and testing results. All required template elements are present.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #15301: clarifying registry file purposes, renaming install-github-integration.reg to register-installed-program.reg, updating registry scripts to align with official installer behavior, and adding proper documentation.
Out of Scope Changes check ✅ Passed All changes directly address the linked issue objectives: manifest refactoring, registry script updates, pre/post-install logic improvements, and notes clarification. No unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c72d4c0 and f42da0a.

📒 Files selected for processing (7)
  • bucket/vscode.json
  • scripts/vscode/install-associations.reg
  • scripts/vscode/install-context.reg
  • scripts/vscode/register-installed-program.reg
  • scripts/vscode/uninstall-associations.reg
  • scripts/vscode/uninstall-context.reg
  • scripts/vscode/unregister-installed-program.reg
🚧 Files skipped from review as they are similar to previous changes (3)
  • scripts/vscode/uninstall-context.reg
  • scripts/vscode/register-installed-program.reg
  • scripts/vscode/uninstall-associations.reg
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.

Applied to files:

  • bucket/vscode.json
📚 Learning: 2025-10-14T11:24:17.524Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:24:17.524Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Capture and Playlist folders are created at runtime (after running the application), not included in the installer, so they should only be in the persist list and not in post_install scripts.

Applied to files:

  • bucket/vscode.json
📚 Learning: 2025-10-14T11:15:55.229Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:15:55.229Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Model and Engine folders are created at runtime (not included in the installer), so they should only be in the persist list and not in post_install scripts that handle .original directories.

Applied to files:

  • bucket/vscode.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (9)
scripts/vscode/unregister-installed-program.reg (1)

1-3: LGTM! Correct registry deletion syntax.

The registry file correctly uses the [-...] syntax to delete the VS Code uninstall registry key. This aligns with the PR objective to properly unregister registry entries during uninstallation.

bucket/vscode.json (7)

3-15: LGTM! Improved documentation and clarity.

The updated description, URLs, and notes provide clearer guidance on registry file purposes. The rename from "install-github-integration.reg" to "register-installed-program.reg" (line 15) accurately reflects the file's actual purpose, addressing the confusion noted in issue #15301.


29-41: Well-structured extensions.json normalization logic.

The pre_install script correctly:

  • Removes computed properties (_sep, fsPath, external) that VS Code regenerates
  • Normalizes extension paths to the portable data directory
  • Backfills missing uuid identifiers from metadata
  • Preserves JSON formatting with proper encoding

This emulates official installer behavior for portable mode. Note: Line 36's regex depends on forward slashes, so the fix for line 28 is required for this to work correctly.


45-52: Good approach to dynamic registry file generation.

The script correctly:

  • Discovers all registry files from the scripts directory
  • Adjusts registry hive (HKLM) and GUID for global installations
  • Replaces the {{vscode_dir}} template placeholder with the actual installation path
  • Uses unicode encoding as required for .reg files

This design is maintainable and supports both user-level and global installs. Note: The template replacement depends on the fix for line 44 to correctly escape backslashes.


65-71: LGTM! Proper version path adjustment for extensions.

The script correctly updates version-specific paths in extensions.json during upgrades by replacing the old version number with $version. The regex pattern appropriately targets the version segment between vscode/ and /data/extensions, and UTF-8 encoding is preserved.


73-80: LGTM! Proper portable mode configuration.

The additions correctly configure VS Code for portable mode:

  • env_add_path: Exposes the code CLI command
  • shortcuts: Creates a standard Start Menu entry
  • persist: Ensures user data, extensions, and settings survive updates

These align with Scoop conventions and enable full VS Code functionality in portable mode.


83-87: LGTM! Duplicate import issue resolved.

The uninstaller now correctly imports three distinct registry files:

  1. uninstall-context.reg - removes context menu entries
  2. uninstall-associations.reg - removes file associations
  3. unregister-installed-program.reg - removes installed program entry

This addresses the previous review concern about the duplicate import and missing file association cleanup. The registry cleanup is now complete and symmetric with the installation.


92-92: LGTM! More reliable version detection.

Using $.productVersion instead of $.name provides more reliable and consistent version detection from the VS Code update API, as product version fields are specifically formatted for version comparison.

scripts/vscode/install-context.reg (1)

1-32: LGTM! Well-structured context menu registry entries.

The registry file correctly defines Windows shell integration for VS Code across all relevant contexts:

  • File context (*\shell\VSCode) for opening individual files
  • Directory background context for opening folders from the folder view
  • Directory context for opening folders from the tree view
  • Drive context for opening entire drives

The consolidated VSCode namespace improves upon the previous implementation, and the {{vscode_dir}} template placeholder will be correctly replaced by the post_install script. The command arguments (%1 for files, %V for folders/drives) follow Windows shell extension conventions.


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

All changes look good.

Wait for review from human collaborators.

vscode

  • 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: 4

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1312243 and 1019a76.

📒 Files selected for processing (7)
  • bucket/vscode.json
  • scripts/vscode/install-associations.reg
  • scripts/vscode/install-context.reg
  • scripts/vscode/register-installed-program.reg
  • scripts/vscode/uninstall-associations.reg
  • scripts/vscode/uninstall-context.reg
  • scripts/vscode/unregister-installed-program.reg
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.

Applied to files:

  • scripts/vscode/uninstall-associations.reg
📚 Learning: 2025-10-16T13:42:43.224Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/debugviewpp.json:14-21
Timestamp: 2025-10-16T13:42:43.224Z
Learning: In the DebugViewPP project (CobaltFusion/DebugViewPP), the executable name changed from "DebugView++.exe" (in v1.8.0.103 and earlier) to "Debugviewpp.exe" (in v1.9.0.28 and later). The manifest bucket/debugviewpp.json correctly uses "Debugviewpp.exe" for current versions.

Applied to files:

  • bucket/vscode.json
📚 Learning: 2025-10-14T11:24:17.524Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:24:17.524Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Capture and Playlist folders are created at runtime (after running the application), not included in the installer, so they should only be in the persist list and not in post_install scripts.

Applied to files:

  • bucket/vscode.json
📚 Learning: 2025-10-14T11:15:55.229Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:15:55.229Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Model and Engine folders are created at runtime (not included in the installer), so they should only be in the persist list and not in post_install scripts that handle .original directories.

Applied to files:

  • bucket/vscode.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (8)
scripts/vscode/unregister-installed-program.reg (1)

1-3: LGTM!

The registry deletion file correctly uses the [-KEY] syntax to remove the installed program entry, and the GUID matches the registration file.

scripts/vscode/register-installed-program.reg (1)

1-10: LGTM!

The registry template correctly creates an installed-program entry that enables integration with other applications. The {{vscode_dir}} placeholder will be replaced during post_install. Omitting UninstallString is appropriate since Scoop manages uninstallation.

scripts/vscode/uninstall-context.reg (1)

3-9: LGTM!

The uninstall registry correctly removes all four context menu entries (*, Directory\Background, Directory, Drive) that are created by install-context.reg.

scripts/vscode/uninstall-associations.reg (1)

973-979: Good coverage of additional file types.

The file now includes uninstall entries for the additional file types mentioned in the PR objectives (.json5, .jsonc, .zshrc, etc.), and properly cleans up the VSCodeSourceFile class at the end.

scripts/vscode/install-context.reg (1)

3-32: LGTM!

The context menu registrations are well-structured:

  • Correct use of %1 for files and %V for directories/drives
  • Consistent {{vscode_dir}} placeholder for Code.exe paths
  • Keyboard accelerator (&i) properly placed in "Open w&ith Code"
bucket/vscode.json (3)

70-77: LGTM - Standard Scoop manifest fields.

The env_add_path, shortcuts, and persist fields are correctly configured for portable mode operation.


87-89: LGTM - Version detection improvement.

Changing from $.name to $.productVersion for checkver is a reliable improvement, as productVersion directly provides the semantic version string.


27-42: No changes needed for the return statement on line 30.

The return statement in the pre_install script behaves as intended. In Scoop's script execution model, manifest scripts are invoked as separate script blocks where return exits the script execution without affecting parent scope—this is the correct and standard behavior for PowerShell in this context.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

vscode

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

Check the full log for details.

@SorYoshino SorYoshino marked this pull request as ready for review December 22, 2025 17:47
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

♻️ Duplicate comments (2)
bucket/vscode.json (2)

44-44: Backslash escaping is still incorrect for .reg file format.

The pattern -replace '\\\\', '\\\\' matches two literal backslashes and replaces with two - effectively a no-op for standard Windows paths like C:\Users\.... The intent is to escape each single backslash for .reg file format (e.g., C:\Users\...C:\\Users\\...).

🔎 Recommended fix using .Replace() method
-        "$vscode_path = $dir -replace '\\\\', '\\\\'",
+        "$vscode_path = $dir.Replace('\\', '\\\\')",

Using the string .Replace() method avoids regex escaping complexity and correctly replaces each single backslash with a double backslash for the .reg file format.


60-61: Unconditional cleanup risks data loss if migration fails.

Lines 60-61 unconditionally delete the original data locations ($env:USERPROFILE\.vscode\argv.json, $env:USERPROFILE\.vscode\extensions, $env:AppData\Code) immediately after the copy operations on lines 52-58. If a copy fails silently (e.g., due to permissions, disk space, or I/O errors), user extensions and settings will be permanently lost.

🔎 Recommended approaches

Option 1: Verify before cleanup

+        "# Verify migration succeeded before cleanup",
+        "$migration_ok = (Test-Path \"$dir\\data\\user-data\\User\\settings.json\") -or (Test-Path \"$dir\\data\\extensions\\extensions.json\")",
+        "if (-not $migration_ok) {",
+        "    warn 'Migration verification failed - original data preserved in AppData and .vscode'",
+        "    return",
+        "}",
         "$remove_list = 'argv.json', 'extensions' | ForEach-Object { \"$env:USERPROFILE\\.vscode\\$_\" }",
         "$remove_list + @(\"$env:AppData\\Code\") | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue"

Option 2: Skip automatic cleanup (safer)

-        "$remove_list = 'argv.json', 'extensions' | ForEach-Object { \"$env:USERPROFILE\\.vscode\\$_\" }",
-        "$remove_list + @(\"$env:AppData\\Code\") | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue"
+        "info 'Migration complete. Original data preserved in:'",
+        "info '  - $env:USERPROFILE\\.vscode (argv.json, extensions)'",  
+        "info '  - $env:AppData\\Code (user-data)'",
+        "info 'You may remove these manually after verifying the portable installation.'"
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1019a76 and c72d4c0.

📒 Files selected for processing (7)
  • bucket/vscode.json
  • scripts/vscode/install-associations.reg
  • scripts/vscode/install-context.reg
  • scripts/vscode/register-installed-program.reg
  • scripts/vscode/uninstall-associations.reg
  • scripts/vscode/uninstall-context.reg
  • scripts/vscode/unregister-installed-program.reg
✅ Files skipped from review due to trivial changes (1)
  • scripts/vscode/unregister-installed-program.reg
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.

Applied to files:

  • scripts/vscode/uninstall-context.reg
  • bucket/vscode.json
  • scripts/vscode/uninstall-associations.reg
📚 Learning: 2025-10-14T11:24:17.524Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:24:17.524Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Capture and Playlist folders are created at runtime (after running the application), not included in the installer, so they should only be in the persist list and not in post_install scripts.

Applied to files:

  • bucket/vscode.json
📚 Learning: 2025-10-14T11:15:55.229Z
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:15:55.229Z
Learning: In PotPlayer manifests (bucket/potplayer.json), the Model and Engine folders are created at runtime (not included in the installer), so they should only be in the persist list and not in post_install scripts that handle .original directories.

Applied to files:

  • bucket/vscode.json
🔇 Additional comments (8)
scripts/vscode/install-context.reg (1)

1-32: LGTM! Registry syntax and structure are correct.

The consolidation under the VSCode namespace with {{vscode_dir}} templates is well-structured. The context menu entries for files, directories, backgrounds, and drives follow Windows registry conventions correctly.

scripts/vscode/uninstall-context.reg (1)

1-9: LGTM! Uninstall entries correctly match installation.

The deletion entries properly remove all four VSCode context menu keys using correct registry syntax. This ensures complete cleanup of context menu integration.

scripts/vscode/uninstall-associations.reg (1)

1-969: LGTM! Comprehensive file association cleanup.

The uninstall registry entries correctly remove VSCode file associations using proper .reg syntax. The pattern is consistent throughout: remove OpenWithProgIDs entries, then delete associated VSCode.* class keys. The final removal of VSCodeSourceFile completes the cleanup.

bucket/vscode.json (4)

3-16: LGTM! Improved description and clearer registry integration notes.

The enhanced description better captures VS Code's capabilities, and the updated notes clearly explain the purpose of each registry file. The rename from install-github-integration.reg to register-installed-program.reg accurately reflects its actual function.


78-86: LGTM! Uninstaller now properly removes all registry entries.

The uninstaller correctly imports all three registry cleanup files:

  1. uninstall-context.reg - removes context menu entries
  2. uninstall-associations.reg - removes file associations
  3. unregister-installed-program.reg - removes installed program entry

This addresses the previous issue where uninstall-context.reg was duplicated and file associations were not removed.


70-77: The manifest fields at lines 70-77 are correctly configured. VS Code includes a bin directory, and Scoop's env_add_path functionality adds the specified directory to the system path, where the directory is relative to the install location. The shortcut and persist settings are also appropriate for portable mode. No issues found.


87-90: Verify that the VS Code update API actually returns a productVersion field.

The checkver jsonpath changed from $.name to $.productVersion. Since I cannot directly test the endpoint in this environment, you should confirm that the update API returns the productVersion field and that it contains the version string in the expected format.

scripts/vscode/register-installed-program.reg (1)

3-3: GUID is correct.

The GUID {771FD6B0-FA20-440A-A002-3B3BAC16DC50}_is1 matches the official VS Code 64-bit user installation and is properly registered under HKEY_CURRENT_USER for user-scope detection by other installers and applications.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

vscode

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

Check the full log for details.

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.

VS Code Windows registry files

1 participant