Conversation
* initial draft of helper based on install * should be refactored with install for a single modular func
This is a good start. Very highly appreciated!!! |
We'll have to figure out the uninstall path (I was thinking hints to program files locations [x86 versus not] for the longest time) for the most common scenarios. |
I think by default if no uninstall path is provided, it tries to find it automatically perhaps via reglookup or similar wmi query. 2 relevant links |
$overrideArguments = $env:chocolateyInstallOverride; | ||
|
||
if ($fileType -like 'msi') { | ||
$msiArgs = "/x `"$file`"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to fix this line because no file name is specified for uninstalling an msi. it should just be $msiArgs = "/x"
right now this version requires obtain a guid from a call like:
Get-WmiObject -Class Win32_Product |Where-Object {$_.Name -like "Notepad*"}
i'd like to fix this in a separate release with a helper so that you can either specify a guid if you know it, or have it try to find one based on a wmi call like the one above.
Win32Reg_AddRemovePrograms might be faster...not sure if every machine has that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I was thinking the GUID because you can search for the installed application as well
This is in. Please delete your branch and pull from there to work on additional pieces... |
This will provide preliminary uninstall functionality. It does require pull 92 and 94 to return versions properly.
This is not a feature rich implementation yet. A refactoring needs to happen and code reuse, since install and uninstall should leverage the same code base with just some easy param logic.
A file called chocolateyuninstall.ps1 will need to exist in the tools folder for packages for this to work.
The contents should look like this
Uninstall-ChocolateyPackage 'windirstat1.1.2.1' 'exe' '/S' 'C:\Program Files (x86)\WinDirStat\Uninstall.exe'