Correct Uninstall

This commit is contained in:
Mario Fetka 2013-08-22 09:29:53 +02:00
parent f0b0a9db4e
commit f02fd3415f
3 changed files with 17 additions and 93 deletions

View File

@ -24,50 +24,16 @@ if FileExists($IniFile$)
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
killtask "qdbus.exe"
Files_uninstall_special
setLoglevel = 7
set $outlist$ = getProcessList
DosInAnIcon_kill_tasks winst /32bit
set $outlist$ = getProcessList
Files_uninstall_special
Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 30
sleepseconds "10"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
killtask "qdbus.exe"
Winbatch_uninstall_old /WaitforProcessending "Au_.exe" /Timeoutseconds 10
sub_check_exitcode
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
set $outlist$ = getProcessList
LogError("uninstallation failed")
isFatalError
endif
setLoglevel = 6
endif
endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
killtask "kleopatra.exe"
@ -75,47 +41,14 @@ if FileExists($UninstallProgram$)
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
killtask "qdbus.exe"
Files_uninstall_special
setLoglevel = 7
set $outlist$ = getProcessList
DosInAnIcon_kill_tasks winst /32bit
set $outlist$ = getProcessList
Files_uninstall_special
Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 30
sleepseconds "10"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
killtask "qdbus.exe"
Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
sub_check_exitcode
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
killtask "qdbus.exe"
killtask "kleopatra.exe"
killtask "gpg-agent.exe"
killtask "dirmngr.exe"
killtask "dbus-daemon.exe"
sleepseconds "10"
set $outlist$ = getProcessList
endif
if not ("" = takefirststringcontaining(getProcessList,"Au_.exe"))
set $outlist$ = getProcessList
LogError("uninstallation failed")
isFatalError
endif
setLoglevel = 6
endif
comment "Delete files"
@ -138,15 +71,6 @@ LinkFolder_uninstall
;
del -sf "$InstallDir$\"
[Files_uninstall_special]
del -f "$InstallDir$\qdbus.exe"
[DosInAnIcon_kill_tasks]
taskkill /IM "kleopatra.exe" /F
taskkill /IM "gpg-agent.exe" /F
taskkill /IM "dirmngr.exe" /F
taskkill /IM "dbus-daemon.exe" /F
[Registry_uninstall]
; Example of deleting a registry key:
;

View File

@ -37,9 +37,9 @@ Set $LogDir$ = "%SystemDrive%\tmp"
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $MinimumSpace$ = "200 MB"
Set $MinimumSpace$ = "20 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\gnupg"
Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\GnuPG"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"

View File

@ -33,7 +33,7 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\gnupg"
Set $InstallDir$ = "%ProgramFiles32Dir%\gnu\GnuPG"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"