Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Feb 4, 2026

Summary

Refines service installation logic, and adds ARM64 support through post-extraction file management.

Related issues or pull requests

Changes

  • Switch to SHA512 hashing.
  • Support multiple architectures by adding platform-specific extraction scripts for 64bit and ARM64.
  • Refactor service management by replacing post_install.exe with native PowerShell service creation and hardening.
  • Improve uninstallation reliability by using Remove-Service (PS 6.0+) and adding explicit process termination.
  • Modernize pre-install/uninstall checks by using abort for better integration with Scoop's error handling.
  • Update checkver and autoupdate to use the GitHub API and structured regex for SHA512.
  • Enhance manifest metadata:
    • Update description and license URL (use HEAD instead of master).
    • Add suggest field for Microsoft Visual C++ 2015-2022 Redistributable.
    • Simplify bin entries.

Notes

  • The files containing ,1 are for the 64-bit architecture, while those with ,2 are for the ARM64 architecture.
  • If profiles on Windows fail to start and a network adapter error is shown use follow the Microsoft Visual C++ 2015 Redistributable instructions to manually install the required Windows libraries.
  • Regarding bin field changes:
    • The previous manifest included pritunl.exe with a --no-main flag (added in Pritunl Client: Add version 1.0.1953.32 #2055). However, official documentation provides no information regarding this parameter, and its original purpose remains unclear.

    • Testing indicates that while --dev-tools is a documented flag, the "Developer Tools" option appears in the UI menu regardless of whether the flag is passed, making it difficult to verify if pritunl.exe correctly accepts CLI arguments.

    • pritunl-client.exe has been confirmed to accept command-line arguments and is now included in the bin field for better accessibility.

      ┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
      └─> pritunl-client --help
      Pritunl Client Command Line Tool
      
      Usage:
        pritunl-client [flags]
        pritunl-client [command]
      
      Available Commands:
        add         Add profile
        completion  Generate the autocompletion script for the specified shell
        disable     Disable autostart for profile
        enable      Enable autostart for profile
        help        Help about any command
        list        List profiles
        logs        Show logs for profile
        remove      Remove profile
        start       Start profile
        stop        Stop profile
        version     Show version
        watch       Watch profiles
      
      Flags:
        -h, --help   help for pritunl-client
      
      Use "pritunl-client [command] --help" for more information about a command.

Testing

The test results are as follows:
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App pritunl-client -Dir 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket' -f
pritunl-client: 1.3.4466.51 (scoop version is 1.3.4466.51)
Forcing autoupdate!
Autoupdating pritunl-client
DEBUG[1768293567] [$updatedProperties] = [url hash] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1768293567] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1768293567] $substitutions.$preReleaseVersion             1.3.4466.51
DEBUG[1768293567] $substitutions.$cleanVersion                  13446651
DEBUG[1768293567] $substitutions.$patchVersion                  4466
DEBUG[1768293567] $substitutions.$baseurl                       https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51
DEBUG[1768293567] $substitutions.$basenameNoExt                 Pritunl
DEBUG[1768293567] $substitutions.$urlNoExt                      https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51/Pritunl
DEBUG[1768293567] $substitutions.$url                           https://github.com/pritunl/pritunl-client-electron/releases/download/1.3.4466.51/Pritunl.exe
DEBUG[1768293567] $substitutions.$minorVersion                  3
DEBUG[1768293567] $substitutions.$buildVersion                  51
DEBUG[1768293567] $substitutions.$version                       1.3.4466.51
DEBUG[1768293567] $substitutions.$dashVersion                   1-3-4466-51
DEBUG[1768293567] $substitutions.$dotVersion                    1.3.4466.51
DEBUG[1768293567] $substitutions.$match1                        1.3.4466.51
DEBUG[1768293567] $substitutions.$underscoreVersion             1_3_4466_51
DEBUG[1768293567] $substitutions.$basename                      Pritunl.exe
DEBUG[1768293567] $substitutions.$matchHead                     1.3.4466
DEBUG[1768293567] $substitutions.$matchTail                     .51
DEBUG[1768293567] $substitutions.$majorVersion                  1
DEBUG[1768293567] $hashfile_url = https://raw.githubusercontent.com/pritunl/pritunl-client-electron/HEAD/SHA512 -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for Pritunl.exe in https://raw.githubusercontent.com/pritunl/pritunl-client-electron/HEAD/SHA512
DEBUG[1768293568] $regex = (?s)1\.3\.4466\.51.+?([a-fA-F0-9]{128}).+?Pritunl\.exe -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: sha512:704afa0da898efc80aa9897b2cd0d5df8e4732382e0ee5d31461c3d3b80abb68a05a3c6f155039af264619e8a85014c60421400cd75d3d7db512e19040b74f40 using Extract Mode
Writing updated pritunl-client manifest

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> $PSVersionTable.PSVersion.Major
5

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> Get-Service -Name 'pritunl'
Get-Service: Cannot find any service with service name 'pritunl'.

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> scoop install Unofficial/pritunl-client
Installing 'pritunl-client' (1.3.4466.51) [64bit] from 'Unofficial' bucket
Loading Pritunl.exe from cache.
Checking hash of Pritunl.exe ... ok.
Extracting Pritunl.exe ... done.
Running pre_install script...done.
Running installer script...done.
Linking D:\Software\Scoop\Local\apps\pritunl-client\current => D:\Software\Scoop\Local\apps\pritunl-client\1.3.4466.51
Creating shim for 'pritunl'.
Making D:\Software\Scoop\Local\shims\pritunl.exe a GUI binary.
Creating shim for 'pritunl-client'.
Creating shortcut for Pritunl (pritunl.exe)
Running post_install script...done.
'pritunl-client' (1.3.4466.51) was installed successfully!
'pritunl-client' suggests installing 'extras/vcredist2022'.

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> Get-Service -Name 'pritunl'

Status   Name               DisplayName
------   ----               -----------
Running  pritunl            Pritunl Client Helper Service


┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> scoop config ignore_running_processes $true
'ignore_running_processes' has been set to 'True'

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> scoop update pritunl-client -f
pritunl-client: 1.3.4466.51 -> 1.3.4466.51
Updating one outdated app:
Updating 'pritunl-client' (1.3.4466.51 -> 1.3.4466.51)
WARN  The following instances of "pritunl-client" are still running. Scoop is configured to ignore this condition.

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    319      17    13200      44136       0.13   1852   1 pritunl
    484      22    35952      74152       0.42  20732   1 pritunl
    780      38   252184     276556       1.20  20924   1 pritunl
    348      15    18980      21356       0.31   8228   0 pritunl-service

Downloading new version
Loading Pritunl.exe from cache.
Checking hash of Pritunl.exe ... ok.
Running pre_uninstall script...done.
Uninstalling 'pritunl-client' (1.3.4466.51)
Running uninstaller script...done.
Removing shim 'pritunl.shim'.
Removing shim 'pritunl.exe'.
Removing shim 'pritunl-client.shim'.
Removing shim 'pritunl-client.exe'.
Unlinking D:\Software\Scoop\Local\apps\pritunl-client\current
Installing 'pritunl-client' (1.3.4466.51) [64bit] from 'Unofficial' bucket
Loading Pritunl.exe from cache.
Extracting Pritunl.exe ... done.
Running pre_install script...done.
Running installer script...done.
Linking D:\Software\Scoop\Local\apps\pritunl-client\current => D:\Software\Scoop\Local\apps\pritunl-client\1.3.4466.51
Creating shim for 'pritunl'.
Making D:\Software\Scoop\Local\shims\pritunl.exe a GUI binary.
Creating shim for 'pritunl-client'.
Creating shortcut for Pritunl (pritunl.exe)
Running post_install script...done.
'pritunl-client' (1.3.4466.51) was installed successfully!

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> scoop uninstall pritunl-client -p
Uninstalling 'pritunl-client' (1.3.4466.51).
Running pre_uninstall script...done.
WARN  The following instances of "pritunl-client" are still running. Scoop is configured to ignore this condition.

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    787      39   253044     278428       2.25  19324   1 pritunl
    655      22    53180      97288       1.73  20924   1 pritunl
    319      17    13344      44048       0.14  21464   1 pritunl
    356      17    21668      23952       0.28  16232   0 pritunl-service

Running uninstaller script...[SC] DeleteService SUCCESS
done.
Removing shim 'pritunl.shim'.
Removing shim 'pritunl.exe'.
Removing shim 'pritunl-client.shim'.
Removing shim 'pritunl-client.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Pritunl.lnk
Unlinking D:\Software\Scoop\Local\apps\pritunl-client\current
Removing older version (_1.3.4466.51.old).
Removing persisted data.
'pritunl-client' was uninstalled.

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> Get-Service -Name 'pritunl'
Get-Service: Cannot find any service with service name 'pritunl'.
  • 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

    • Added automatic Windows service management during installation and uninstallation
  • Improvements

    • Streamlined and enhanced installation workflow
    • Updated automatic version detection and update retrieval mechanisms
    • Refined installation preparation processes

* Add arm64 version
* Update checkver & autoupdate
* Refactor service management logic
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

This PR updates the Pritunl-Client Scoop manifest, restructuring the Windows installation process from direct downloads to scripted installers with automatic file renaming and expanded service management logic, while updating GitHub-based version detection and checksum verification.

Changes

Cohort / File(s) Summary
Manifest Configuration
bucket/pritunl-client.json
Updated description and license. Added innosetup flag, suggest field, and top-level hash/url. Restructured 64bit and arm64 architectures to use installer scripts for file handling instead of direct downloads. Enhanced pre-install with PowerShell abort. Expanded post-install to multi-step PowerShell service management. Rewrote uninstall logic with pre-uninstall admin checks and explicit uninstaller object. Updated bin entries to include pritunl-client.exe. Modified checkver to GitHub-based lookup and autoupdate to HEAD SHA512 hash detection.

Sequence Diagram

sequenceDiagram
    participant User
    participant Scoop as Scoop Installer
    participant Installer as PowerShell Installer Script
    participant FileSystem as File System
    participant WinService as Windows Services
    
    User->>Scoop: Install Pritunl-Client
    Scoop->>Installer: Execute pre_install (PowerShell abort check)
    Installer->>Scoop: Pre-install validation
    
    Scoop->>Installer: Execute installer script (64bit/arm64)
    Installer->>FileSystem: Remove old files (Clean-up)
    Installer->>FileSystem: Download and rename .exe files
    FileSystem->>Installer: Files ready
    
    Scoop->>Installer: Execute post_install script
    Installer->>WinService: Check for existing service
    alt Service doesn't exist
        Installer->>WinService: Create and register helper service
        Installer->>FileSystem: Configure service in registry
    else Service exists
        Installer->>WinService: Register failure action recovery
    end
    WinService->>Installer: Service configured
    Installer->>Scoop: Post-install complete
    
    Scoop->>FileSystem: Create shims for pritunl.exe, pritunl-client.exe
    FileSystem->>User: Installation complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

review-needed

Suggested reviewers

  • z-Fng

Poem

🐰 A manifest reborn, with scripts now so bright,
Files renamed and services managed just right,
PowerShell dances through install and unwind,
Windows services nested, all carefully aligned—
Pritunl hops forward, no more naming strife! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'pritunl-client: Refactor manifest' clearly summarizes the main change (refactoring of the manifest file) and follows the conventional format specified in the contributing guide.
Linked Issues check ✅ Passed The PR successfully addresses the core requirement from issue #15194: correcting executable naming and manifest bin entries to enable proper shim creation. The manifest changes include corrected bin field with pritunl-client.exe, proper service management, and platform-specific file handling that resolve the original shim creation failure.
Out of Scope Changes check ✅ Passed All changes are directly related to refactoring the pritunl-client manifest to resolve installation issues. Updates to description, license URL, hash algorithm, architecture-specific installers, service management, checkver/autoupdate, and bin entries are all within the scope of fixing the manifest and improving installation reliability.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive and exceeds the template requirements with detailed summaries, related issues, specific changes, testing results, and explanations of architectural decisions.

✏️ 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

github-actions bot commented Feb 4, 2026

All changes look good.

Wait for review from human collaborators.

pritunl-client

  • 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.

[Bug]: Pritunl-Client error on install due to wrong .exe naming.

1 participant