choco icon indicating copy to clipboard operation
choco copied to clipboard

Record environment changes in pkg info

Open ferventcoder opened this issue 10 years ago • 2 comments

Related to #563 - record a package's environment changes so on uninstall they are reversed (like PATH additions).

ferventcoder avatar Jan 21 '16 13:01 ferventcoder

There is a todo comment here about this feature request: https://github.com/chocolatey/choco/blob/develop/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs

TheCakeIsNaOH avatar Feb 05 '22 03:02 TheCakeIsNaOH

Potential concerns for this:

  • We don't want to be overzealous; other applications may modify environment variables during a choco install/upgrade. Recording too much of the changes and then reversing them is liable to cause Issues:tm:.
  • We should probably separately record things from Install-ChocolateyPath and ensure they're removed if packages don't remove it on their own.
  • Is there possibly a way we can monitor processes spawned from choco itself or child processes and filter registry changes based on those processes and what registry access they do? This feels cursed but would be the most complete solution.

vexx32 avatar May 14 '24 13:05 vexx32