How to uninstall putty 0.63 verysilent?
Hello,
my putty uninstall code is:
********************************************
:$BeginUninstallScript
KillProcess('putty.exe',kpKillFirst+kpByFileName)/TS
ExecuteEx('"%ProgramFilesDir%\PuTTY\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-','_RC','3')/?/TS
If not %_rc%='0'
ExitProcEx(Failed,'Installation failed')
********************************************
it works good, but a messagebox will be shown during uninstall. If i click 'yes' uninstall will silent continue.
So, How can i suppress this message box?
a message box content asks the user, if he wants to save his sessions ...
Thanks for your help
mimo06
-
Tis is a very old thread. But I am having the same issue. What kind if a script is that? I am having problems suppressing same msg box. Thank you. - ogeccut 9 years ago
Answers (4)
hello rsubrata,
my solution consists of four steps:
!**********************************************
!Uninstall
: $BeginUninstallScript
!Step1
!Kill task putty.exe
KillProcess('putty.exe',kpKillFirst+kpByFileName)/TS
!Step2
!Delete links and Folder Putty
RemoveLink('PuTTY','','Programs\PuTTY',cgAsCommon)/TS
RemoveLink('Pageant','','Programs\PuTTY',)/TS
RemoveLink('PSFTP','','Programs\PuTTY',)/TS
RemoveLink('PuTTY Manual','','Programs\PuTTY',)/TS
RemoveLink('PuTTY Web Site','','Programs\PuTTY',)/TS
RemoveLink('PuTTYgen','','Programs\PuTTY',)/TS
RemoveFolder('Programs\PuTTY',cgAsCommon)/TS
!Step3
!Remove all files and the folder PuTTY: C:\Program Files 86)\PuTTY\
Delete('%ProgramFilesDir%\PuTTY')/S/F/TS
RemoveDir('%ProgramFilesDir%\PuTTY')/S/TS
!Step4
!Remove folder PuTTY_is1 from the Registry, it is created during the installation.
RegDeleteKey('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1','',)/TS
!Remove the sessions stored by the user, if they exist.
If RegKeyExists('HKEY_CURRENT_USER\Software\SimonTatham')
RegDeleteKey('HKEY_CURRENT_USER\Software\SimonTatham','',)/TU
!**********************************************
So, You can customize this solution for your needs.
Comments:
-
hi mimo06, Thanks so much for your script and explanation. I got it now, that the script literally just to remove putty without the uninstaller executable. What I've been trying is still use the uninstaller executable with different parameters to suppress it. But this will work well. Thanks again Mimo06! - rsubrata 10 years ago
-
Hello Mimo,
What kind of script is this? And could you help me giving some info about how to run this script? - seemon 9 years ago
I struggled with this for a few hours on Windows. I ended up discovering what caused the prompts using Task Manager (putty.exe!). I made this simple bat for SCCM deploys:
: Begin
@echo off
taskkill /f /im putty.exe
cd "C:\Program Files (x86)\PuTTY"
DEL putty.exe
unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
: End
Change the directory for 64-bit and it works just as good. (for example "C:\Program Files\Putty")...Cleans up most versions below .70.
It should simply work with the following command
C:\Program Files (x86)\PuTTY\unins000.exe /silent
Comments:
-
thanks for your help!
@aragorn.2003: yes, it works like my solution, but the message box is still shown.
That's why I tried the solution by SMal.tmcc and it works.
@SMal.tmcc: putty write folowing folder PuTTY_is1 to the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1
For my putty-Uninstall i delete all Putty directory, links and the folder PuTTY_is1 from the registry.
The Uninstall works now clean without messagebox. - mimo06 11 years ago-
@mimo06: do you happened to have the script of the uninstaller without the messagebox that works for you? I am still having the same issue with the messagebox popup. Thank you! - rsubrata 10 years ago