From 991b521d57185e16debdac0434d092b1086fd320 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Tue, 27 Sep 2016 10:26:09 -0500 Subject: [PATCH] (GH-982) Note AutoUninstaller in uninstall template Provide guidance at the top of the uninstall template that the uninstall script may be unnecessary due to AutoUninstaller and licensed version enhancements. --- .../templates/ChocolateyUninstallTemplate.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chocolatey/infrastructure.app/templates/ChocolateyUninstallTemplate.cs b/src/chocolatey/infrastructure.app/templates/ChocolateyUninstallTemplate.cs index bf2fd9d1fc..de23a9aade 100644 --- a/src/chocolatey/infrastructure.app/templates/ChocolateyUninstallTemplate.cs +++ b/src/chocolatey/infrastructure.app/templates/ChocolateyUninstallTemplate.cs @@ -22,6 +22,9 @@ public class ChocolateyUninstallTemplate # $f='c:\path\to\thisFile.ps1' # gc $f | ? {$_ -notmatch ""^\s*#""} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+"".~"" -en utf8; mv -fo $f+"".~"" $f +## NOTE: In 80-90% of the cases (95% with licensed versions due to Package Synchronizer and other enhancements), you may +## not need this file due to AutoUninstaller. See https://chocolatey.org/docs/commands-uninstall + ## If this is an MSI, cleaning up comments is all you need. ## If this is an exe, change installerType and silentArgs ## Auto Uninstaller should be able to detect and handle registry uninstalls (if it is turned on, it is in preview for 0.9.9).