[Gelöst]:Deinstallation von Software funktioniert nicht
Verfasst: 19 Aug 2011, 11:30
Hallo allerseits...
ich hab einen Knoten im Kopf (ts... ts... wer mach den SOWAS?) und komme nicht zu einer Lösung. Handbuch und Forum helfen leider nicht weiter.
Softwarepakete, die ich irgendwie mit meinem Halbwissen zusammenschraube, installieren sich ganz toll. Nur wenn ich Software auf dem Client per Remote wieder deinstallieren will, geht einfach garnichts.
Beispiel Mozilla Firefox (gilt auch für andere Softwarepakete, die ich baue)
Mozilla hat eine helper.exe, die liegt im Verzeichnis c:\Programme\Mozilla Firefox\uninstall\helper.exe. Rufe ich die per Hand auf mit dem Parameter /S ist - wen wunderts - Firefox nach Programmende weg.
In dem Paket habe ich eine uninstall.ins mit hineingepackt, die sie wie folgt aus:
die control sieht wie folgt aus:
Alles, was passiert ist, dass wenn Firefox wieder aufgewrufen wird, er offensichtlich im "Neu-Zustand" ist, also wieder fragt, ob Einstellungen des Internet-Explodierers übernommen werden sollen.
Aber warum deinstalliert sich Mozilla hier nicht auf Anforderung? Was mach ich da falsch?
Vielen Dank,
Thomas_H
ich hab einen Knoten im Kopf (ts... ts... wer mach den SOWAS?) und komme nicht zu einer Lösung. Handbuch und Forum helfen leider nicht weiter.
Softwarepakete, die ich irgendwie mit meinem Halbwissen zusammenschraube, installieren sich ganz toll. Nur wenn ich Software auf dem Client per Remote wieder deinstallieren will, geht einfach garnichts.
Beispiel Mozilla Firefox (gilt auch für andere Softwarepakete, die ich baue)
Mozilla hat eine helper.exe, die liegt im Verzeichnis c:\Programme\Mozilla Firefox\uninstall\helper.exe. Rufe ich die per Hand auf mit dem Parameter /S ist - wen wunderts - Firefox nach Programmende weg.
In dem Paket habe ich eine uninstall.ins mit hineingepackt, die sie wie folgt aus:
Code: Alles auswählen
************************************************************
delsub.ins
************************************************************
; Message at install time:
Message "Deinstalling "+$ProductId$+" ..."
; kill a running firefox
killtask "firefox.exe"
; if firefox uninstall program exists then start it
if FileExists(""+$MozInstallDir$+"\uninstall\helper.exe")
set $UninstallCommand$ = ""+$MozInstallDir$+"\uninstall\helper.exe"
set $UninstallCommand$ = '"'+$UninstallCommand$+'" /S'
WinBatch_start_FirefoxUninstall /WaitSeconds 20
sub_check_exitcode
endif
; delete registry entry to the current installed version
Registry_delete_current_version
; delete files of current version
if not ($MozInstallDir$ = "")
Files_copy_deinstall
endif
[WinBatch_start_FirefoxUninstall]
$UninstallCommand$
;%SCRIPTPATH%\sleep 5
[Files_copy_deinstall]
delete -sf "$MozInstallDir$\"
[Registry_delete_current_version]
OpenKey [HKEY_LOCAL_MACHINE\Software\Mozilla\Mozilla Firefox]
set "CurrentVersion" = ""
[sub_check_exitcode]
comment "test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: "+$ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: "+$ExitCode$
isFatalError
endif
endif
endif
endif
Code: Alles auswählen
[Package]
version: 1
depends:
incremental: False
[Product]
type: localboot
id: firefox6
name: Firefox 6
description: Firefox-Browser Ver. 6
advice:
version: 6.0
priority: 0
licenseRequired: False
productClasses:
setupScript: setup.ins
uninstallScript: uninstall.ins
updateScript:
alwaysScript:
onceScript:
customScript:
userLoginScript:
[Changelog]
firefox (6.0-1) testing; urgency=low
* Initial package
Aber warum deinstalliert sich Mozilla hier nicht auf Anforderung? Was mach ich da falsch?
Vielen Dank,
Thomas_H