Seite 1 von 1

Antivir Avira Skript Fehler

Verfasst: 30 Mai 2014, 14:29
von Haining
Hallo liebe Forum Mitglieder,

ich habe jetzt Skripts von Interaktives Setup mit automatisierten Antworten für Antivirus Avira geschrieben. Die Installation funktioniert super. Aber die Uninstallation nicht. Nach der Installation von Avira.exe wurde 2 Verzeichnisse (My Avira, AntiVir Desktop) erzeugt. Daher müssen die beiden deinstalliert werden.

Ich habe folgende Probleme:
1. Wie man kann das Feedback mit Webbrowser nach der Installation verhindern?
2. Das letzte Fenster mit Neustarten nach der Uninstallation von AntiVir Desktop wurde nie erkannt.

Opsi-Client OS: Windows 7 64 Bit
Opsi-Server OS: Ubuntu 12.04

setup.ins

Code: Alles auswählen

[Initial]
;Standard Text, der während der Installation angezeigt wird
Message = Bitte warten, das Produkt wird installiert
;Loglevel einstellen
setLogLevel = 6
;Bei Fehlern abbrechen
ExitOnError=false
;Syntax Fehler werden in einem separaten Fenster angezeigt
ScriptErrorMessages=on
;Single-Step Mode nicht verwenden
TraceMode=off
;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen
StayOnTop=false
[Actions]
;Variable für die Ermittlung des Betriebssystems
        DefVar $OS$
        set $OS$ = GetOS
;Variable für die Ermittlung der Betriebssystem Unterversion
        DefVar $NTVersion$
        set $NTVersion$ = GetNTVersion
;Name des Produkts (max. 12 Zeichen)
        DefVar $ProductName$
        Set $ProductName$ = "Avira"
;Dateiname des Produktbildes mit Erweiterung
        DefVar $ProductPicture$
        Set $ProductPicture$ = "Avira.png"
;Die Variable zur Auswertung des ExitCodes
        DefVar $ExitCode$
;Vollständiger Produktname incl. Versionsnummer
        DefVar $ProductNameFull1$
        set $ProductNameFull1$ = "Antivir Avira 5.1.7"
;Dateinamen der zu installierenden MSI-Pakete
        DefVar $Executable1$
        Set $Executable1$ = "Avira.msi"
;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens
        Message "Installiere "+$ProductNameFull1$
;Prüfen der Winst Version
        requiredWinstVersion >= "4.11"
;$ProductPicture$ und $ProductName$ anzeigen
        ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ 
;Freien Speicherplatz ermitteln
        if not (HasMinimumSpace ("%SYSTEMDRIVE%", "500 MB"))
                LogError "Nicht genügend Platz auf %SYSTEMDRIVE%"
                isFatalError
        endif
;OS-Version ermitteln
        if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" )
                Message "Deinstallation alter Produktversionen"
                sub "%ScriptPath%\delsub.ins"
                Message "Installiere "+$ProductNameFull1$
                Winbatch_Install
                Sub_check_exitcode
                LinkFolder_Custom
                
        else
                LogError "Kein kompatibles Betriebssystem installiert"
                isFatalError
        endif
 
[Winbatch_Install]
%scriptpath%\AutoIt3.exe %scriptpath%\Avira.au3
 
[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
 

[LinkFolder_Custom]
;Startmenü anpassen
set_basefolder common_programs
set_subfolder ""
delete_subfolder "Antivir Avira"
set_subfolder ""
set_link
        name: Antivir Avira 
        target: "%ProgramFiles32Dir%\Avira\Avira.exe"
        parameters:
        working_dir: "%ProgramFiles32Dir%\Avira"
        icon_file:
        icon_index:
end_link
uninstall.ins

Code: Alles auswählen

[Initial]
;Standard Text, der während der Deinstallation angezeigt wird
Message = Bitte warten, das Produkt wird deinstalliert
;Loglevel einstellen
SetLogLevel = 6
;Bei Fehlern abbrechen
ExitOnError = false
;Syntax Fehler werden in einem separaten Fenster angezeigt
ScriptErrorMessages = on
;Single-Step Mode nicht verwenden
TraceMode = off
;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen
StayOnTop = false
[Actions]
;Name des Produkts (max. 12 Zeichen)
        DefVar $ProductName$
        Set $ProductName$ = "Avira"
;Dateiname des Produktbildes mit Erweiterung
        DefVar $ProductPicture$
Set $ProductPicture$ = "Avira.png"

;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$

;$ProductPicture$ und $ProductName$ anzeigen
ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
sub "%ScriptPath%\delsub.ins"
delsub.ins

Code: Alles auswählen

Message "Uninstalling "  + " ..."
 
if FileExists("%ProgramFiles32Dir%\Avira\My Avira\Avira.OE.Systray.exe")
	comment "Uninstall program found, starting uninstall"
	Winbatch_uninstall
	Winbatch_uninstall_Programs
	Winbatch_Free_Uninstall
	sub_check_exitcode
endif

[Winbatch_Uninstall]
MsiExec.exe /x {D0DB3714-CFA1-4FA7-ABA3-B1DCB5998895} /qb-!

[Winbatch_uninstall_Programs]
%scriptpath%\AutoIt3.exe %scriptpath%\avirauninstall.au3

[Winbatch_Free_Uninstall]
%scriptpath%\AutoIt3.exe %scriptpath%\avirafreeuninstall.au3

[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

[Linkfolder_Custom]
 
;Startmenü Verknüpfung löschen
Set_basefolder common_programs
Set_subfolder ""
delete_element "Antivir Avira"
Avira.au3

Code: Alles auswählen

;Starte Avira Installation
Run ("Avira.exe")
WinWaitActive("Avira Setup","")
Sleep(5000)
;Klicke Button Next
Send("{SPACE}")
Sleep(10000)
;Warten bis Installation fertig ist
Sleep(50000)
Exit
avirauninstall.au3

Code: Alles auswählen

;Starte Avira Deinstallation
Run ("Avira.exe")
WinWaitActive("Avira Setup","")
Sleep(1000)
;Klicke Button Next
Send("{TAB}{SPACE}")
;Warten bis Deinstallation fertig ist
Sleep(20000)
Send("{SPACE}")
Sleep(1000)
Exit
avirafreeuninstall.au3

Code: Alles auswählen

;Starte Avira Free Antivirus Deinstallation
Run ("C:\Program Files (x86)\Avira\AntiVir Desktop\setup.exe")
WinWaitActive("Avira Free Antivirus","")
Sleep(1000)
;Klicke Button Next
Send("{DOWN}{TAB}{SPACE}")
Sleep(1000)
WinWaitActive("Setup von Avira Free Antivirus","")
Sleep(1000)
Send("{SPACE}")
Sleep(20000)
WinWaitActive("Systemneustart – Avira Free Antivirus","")
Send("!J")
Sleep(10000)
Exit
Ich bin für jede Hilfe dankbar

Gruß
Haining

Re: Antivir Avira Skript Fehler

Verfasst: 30 Mai 2014, 22:44
von mensch90
Ohne mich jetzt mit Avira auszukennen: Was machst du dir das Leben so umständlich?!

Anstatt deine Klick-Orgien mit AutoIt zu starten nutze doch die gängige Silent Install und Uninstall-Methoden.

http://www.avira.com/de/support-for-bus ... /kbid/1011

Re: Antivir Avira Skript Fehler

Verfasst: 04 Jun 2014, 14:14
von Thomas_H
Moinsens,

nur als Ergänzung für Avira Antivirus Free: Hier gibt es kein Silent Install!
Wer also auf einen freien Virenscanner zurückgreifen will / muss, sollte auf beispielsweise AVG Free zurückgreifen.

Gruß

Thomas_H

Re: Antivir Avira Skript Fehler

Verfasst: 04 Jun 2014, 23:30
von mensch90
I.d.R. geht man in einem Opsi-Umfeld von einer Professional/Business-Version samt zentralem MGMNT aus ;)

... und wer Avira nach den False-Positives, die komplette Betriebe und Privathaushalte dank schlecht geprüfter Signaturen lahmgelegt haben, der letzten zwei Jahre noch über den Weg traut... nun gut, einige mögen halt Schmerzen.

Re: Antivir Avira Skript Fehler

Verfasst: 05 Jun 2014, 14:51
von Thomas_H
Moinsens...
mensch90 hat geschrieben:I.d.R. geht man in einem Opsi-Umfeld von einer Professional/Business-Version samt zentralem MGMNT aus ;)

... und wer Avira nach den False-Positives, die komplette Betriebe und Privathaushalte dank schlecht geprüfter Signaturen lahmgelegt haben, der letzten zwei Jahre noch über den Weg traut... nun gut, einige mögen halt Schmerzen.
...sofern der Arbeitgeber das bezahlt. Wir bekommen aus Geldmangel nicht mal Win7-Lizenzen und arbeiten nach wie vor auf Windows XP! Ist ja nicht so, dass die Rechner als Internet-PCs am Internet sind, oder so... "kann ja nix passieren... UNS schützt ja der Host!" (wahrscheinlich war HoRst gemeint... oder sooo...)

Gruß

Thomas_H

Re: Antivir Avira Skript Fehler

Verfasst: 05 Jun 2014, 15:46
von mensch90
auch wenn es offtopic ist: zum Thema horst:

http://www.spassfieber.de/funpics/bauar ... uen-zu.jpg

Re: Antivir Avira Skript Fehler

Verfasst: 07 Jun 2014, 13:36
von SisterOfMercy
mensch90 hat geschrieben:I.d.R. geht man in einem Opsi-Umfeld von einer Professional/Business-Version samt zentralem MGMNT aus ;)
I also support quite a few home users (friends, family, etc) and here OPSI will also save me a lot of time. I am going to use it for my home computers as well, don't have to install everything three times manually. :D

I also looked into making an AutoIt script, for avast, but it would be way more work than AVG, which comes with an MSI. It's also possible to install AVG _without_ all that crap, which makes it a lot faster. (should put the script in the wiki one day)

Re: Antivir Avira Skript Fehler

Verfasst: 07 Jun 2014, 13:47
von mensch90
Wenn man als Privatanwender Opsi verwendet - dann hat man neben der geopferten Zeit auch 20 € für eine vollständig deploybare Businessversion seines Antivirusprogramm des Vertrauens...

Re: Antivir Avira Skript Fehler

Verfasst: 07 Jun 2014, 21:34
von SisterOfMercy
mensch90 hat geschrieben:Wenn man als Privatanwender Opsi verwendet - dann hat man neben der geopferten Zeit auch 20 € für eine vollständig deploybare Businessversion seines Antivirusprogramm des Vertrauens...
True, but I'm in a bit of a bind: The last version of avast to work on XP x64 is the 9.0.2008 version. I hope this changes in the future, as I was about to get a few endpoint thing-me-bobs licenses from them. I also support old computers that aren't used very much through the day. For instance, an old pentium 3 that gets used once a week to show an image to be reproduced on canvas. At least I can offer some basic security for those machines.
For the main PC's of those people it is of course a different story.

Re: Antivir Avira Skript Fehler

Verfasst: 10 Jun 2014, 15:41
von Thomas_H
Moinsens,
mensch90 hat geschrieben:Wenn man als Privatanwender Opsi verwendet - dann hat man neben der geopferten Zeit auch 20 € für eine vollständig deploybare Businessversion seines Antivirusprogramm des Vertrauens...
also zum einen kosten die nicht nur 20 Euros... das geht ab 70 Eus bei guten Programmen / Rechner los :-) Zum anderen möchte ICH nicht die Lizenzgebühren bezahlen für Rechner die nicht mal meine sind.
Und nicht immer ist eine deploybare Businesslösung ideal. Denn die macht dem netten freundlichen Helfer nur unnötig Arbeit, die ein gekauftes Antivirenprogramm bei richtiger Konfiguration auch allein macht. ;)

Gruß

Thomas_H