Errors trying to uninstall tentacle using the MSI file

Hello support,
I am trying to script an uninstall routine for the Tentacle client on multiple servers (Win2008R2). In my batch file, I’m doing the tentacle.exe /uninstall, which runs ok, and removes the service, but now I need to uninstall the Tentacle Admin tools, remove the program folder, etc. I tried launching the Octopus.Tentacle.x.x.x.MSI installer file with the /uninstall switch, but it popped up an error box stating the following:
"This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package."
Can I script the uninstall this way, or is the only way to uninstall by using Programs & Features, and manually doing it via the GUI?

P.S. - I don’t see an entry in the registry (HKLM\Software\Microsoft\Windows\Uninstall) that would give me the uninstall syntax, and in some cases, there is no Octopus program entry in Programs & Features.

Hi Karl,

The only way that I know of is via programs and features, sorry.

For Octopus 2.0 we’ll try to make sure that we can support an automated uninstall of Tentacle.

If you happen to know the changes necessary to make it work with WIX I can try to get a custom 1.X build out for you.

Paul

Hi Paul,
I need to re-open this discussion again, as we are preparing to “upgrade” our current Octopus 1.6.1.1718 environment to Octopus 2.0.

First off, I was asked to uninstall the 1.6 version of Tentacle on all of the machines before deploying the 2.0 Tentacle client, in order to avoid running 2 versions of the client on each machine. Now the interesting part:
I had previously deployed and registered Tentacle to our clients using the scripted method that is mentioned in these forums. That worked well.
Except for the fact that I do not have an entry in “Programs and Features” for “Octopus Deploy Tentacle” - I’m assuming this is because the install was not interactive, due to it being completed using my script.
Even without Tentacle listed in Programs and Features, I can go to Start, All Programs, Octopus, and there I have entries to launch the Administration Tool and the Tentacle agent (interactive).

I guess now I would like to know how to remove Tentacle manually.
From another post, I see that I could run tentacle.exe /uninstall to remove the service, but then I would need to remove the folders, and registry entries
(i.e. all things that the Control Panel un-install would do…)
If I have this info, I can script an uninstall that I can run remotely to remove Tentacle 1.6 from my clients, thus allowing a somewhat clean install of the Tentacle 2.0 client.

Thoughts? Other options?

Hi,

Sure, happy to help! The old MSI unfortunately installed Octopus on a per-user basis rather than system-wide. Even when the MSI is installed silently via the command line, it will create an entry in Add/Remove Programs, but you won’t be able to see it if you aren’t logged as the same user that was used to install it. Is that something you might be able to do?

Paul

Thanks for the response - sorry it took so long to update. I did have access to the user account that was used to deploy the Tentacles via script. I logged in to a server using this account, and still could not see the Octopus Tentacle “item” in the Programs & Features GUI. However, I searched the registry and found:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall… and there is an UninstallString for Octopus. Perhaps I need to try uninstalling using this? For some reason, I remember trying this before, using the MsiExec.exe /X{…programID…} and it didn’t work.

Hello again,
Not sure if there is any complete answer for this, but here is my dilemma:
** I have hundreds of Win2008R2 machines that have the Tentacle 1.6 client installed - so my uninstall needs to be scripted.
** 99% of them were installed with a Powershell script that silently installed the Tentacle .MSI file, and then automatically registered with the Octopus server.
** Most, if not all of these servers do NOT have an entry in “Programs & Features” that will allow me to easily uninstall.
** The uninstall string - MSIEXEC /U {…GUID…} - is present in the registry, but errors out when I try to run it.

Can I do the following to manually uninstall the Tentacle 1.6 client?

Run Tentacle.exe /uninstall (to remove the service)
Delete the HKLM\Software\Octopus key
Delete the C:\Program Files (x86)\Octopus Tentacle folder
Delete the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Octopus folder

My intention is to “remove” the 1.6 tentacle that is registered to our “old” Octopus server, and then run a new silent install of the new v2.0 Tentacle client, and register to the new Octopus 2.0 server, which is running alongside our current one, only using a different port.
Will this work?

Thanks in advance for your assistance!

Hi Karl,

This sounds like a reasonable plan; as with all such things I’d check for correct operation on one machine before rolling out them all this way, but I can’t see any issues with it.

In our upgrading guide, there’s a snippet for uninstalling the 1.6 Tentacle with PowerShell/WMI that you might try also:

function Uninstall-OldTentacle {
  Write-Output "Uninstalling the 1.0 Tentacle"
  $app = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name = 'Octopus Deploy Tentacle' AND Version < 2.0"         
  $app.Uninstall()
  & sc.exe delete "Octopus Tentacle"
}

It will probably suffer the same issue you’re already experiencing with the uninstall, but it’s worth a shot (the complete script is at http://docs.octopusdeploy.com/display/OD/Upgrading+from+Octopus+1.6).

Hope this helps,
Nick

Hey Nick, thanks for the reply…
I did look at the script in the upgrade guide, and actually tried running the “Get-WmiObject” statement manually in PowerShell, to see what it came back with. After about 2 minutes, it returned nothing, so I figured it wouldn’t be worth running the whole script. :frowning: I will proceed with the manual method on a test server, and see how that goes.