Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sandboxie] Bug: install script leaves installer shims #8

Closed
1 of 3 tasks
Destroy666x opened this issue Apr 13, 2023 · 3 comments
Closed
1 of 3 tasks

[sandboxie] Bug: install script leaves installer shims #8

Destroy666x opened this issue Apr 13, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Destroy666x
Copy link

Destroy666x commented Apr 13, 2023

  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • What is the current behavior?

The Chocolatey package leaves installer shims in C:\ProgramData\chocolatey\bin

  • If the current behavior is a bug, please provide the steps to reproduce the problem:
  1. Install with choco
  2. Update with choco
  3. Check C:\ProgramData\chocolatey\bin - multiple exes will be there
  • What is the expected behavior?

Only one executable in that dir, for sandboxie, if any. Perhaps one for the main executable, defined by .gui file.

  • What is the motivation / use case for changing the behavior?

Avoid chaos in there, easier to call through CLI if without a version.

  • Please tell us about your environment:

    • Choco package name: sandboxie
    • Version: any
@Destroy666x
Copy link
Author

Destroy666x commented Sep 2, 2023

Shims aren't documented too well IMO, but here's what actually happens:

  • you're downloading installer to chocolatey\lib\sandboxie-plus.install kind of folder in chocolateyInstall.ps1
  • you're not deleting that installer after it finishes the job
  • Chocolatey automatically shims anything in that dir or subdirs after installer script finishes

Possible solutions:

  • download the installer somewhere else if it's needed later for any reason (e.g. is it required for uninstalling? no idea)
  • delete the installer at the end of install script if it's not needed, so Remove-Item "$toolsPath\Sandboxie-Plus-x86-v1.10.5.exe"

@Jackenmen

@Destroy666x Destroy666x changed the title [sandboxie] Bug: updates leave old version shims [sandboxie] Bug: install script leaves installer shims Sep 2, 2023
@Jackenmen
Copy link
Owner

Oh, it's about shims for the installer. Installers in embedded packages are generally ignored by using a .ignore file (see: https://docs.chocolatey.org/en-us/features/shim#i-need-to-exclude-a-file-from-shimming)

I'll fix it, thanks for investigating this further.

@Jackenmen Jackenmen added the bug Something isn't working label Sep 2, 2023
@Jackenmen
Copy link
Owner

Jackenmen commented Sep 2, 2023

I was a bit wrong, installers in embedded packages are actually removed but a .ignore file is added if the removal fails. Either way, this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants