[Gelöst] Unattended Installation funzt nicht (AVG 2011 Free)

Antworten
Benutzeravatar
Thomas_H
Beiträge: 524
Registriert: 09 Jun 2010, 11:57
Wohnort: Havelland

[Gelöst] Unattended Installation funzt nicht (AVG 2011 Free)

Beitrag von Thomas_H »

Hallo Opsi-Gemeinde,

ich bekomme die unbeaufsichtigte Installation des Programms AVG 2011 Free nicht hin. Ich habe die heruntergeladene Installationsdatei "avg.exe" genannt, weil der Dateiname sonst ewig lang ist und für die Installation der Name eigentlich wursch ist.

Die Unattended-Parameter sind wie folgt:

Code: Alles auswählen

avg.exe /UILevel=silent /InstallToolbar=0 /ChangeBrowserSearchProvider=0 /InstallSidebar=0 /ParticipateProductImprovement=0 /DontRestart
Wird das Programm auf dem Ziel-PC so mittels (Start -> Ausführen, Windows XP) aufgerufen, kann man nur im Taskmanager sehen, dass etwas passiert. Zum Schluß ist schließlich das AVG-Symbol auf dem Desktop und AVG installiert.
Installiere ich das aber mit Opsi und starte ich die Installation "on Demand" dann müßte der Anwender die gesamte Installationsprozedur durchgehen, als ob überhaupt keine Parameter übergeben wurden.

Übersehe ich was? Hab ich was vergessen? Oder geht es mit diesem Programm überhaupt nicht? Die Parameter zum Aufruf der Unattended Installation von AVG habe ich übrigens von AVG selbst.

Die setup.ins die ich dazu gebaut habe sieht folgendermaßen aus (den Bereich Winbatch_Install64 nicht beachten, der wird angepaßt, wenn Winbatch_Install32 funktioniert!):

Code: Alles auswählen

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/

[Initial]
LogLevel=9
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false


[Actions]
requiredWinstVersion >= "4.10.8.6"

DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
DefVar $Uninst_Cmd$
DefVar $Uninst_Prg$

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")


Set $LogDir$ = "%SystemDrive%\tmp"

; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$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 $ProductId$       = "avg"
;Kein Punkt in der Versionsnummer! 4.30 ist 430, 4.40 ist 440 oder 4.51 ist 451!
Set $Version$         = "2011"
Set $MinimumSpace$    = "30 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\avg-free"
Set $InstallDir64$      = "%ProgramFiles64Dir%\avg-free"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Inst_Prg$ = "avg.exe"
Set $Inst_Cmd32$ = '/UILevel=silent /InstallToolbar=0 /ChangeBrowserSearchProvider=0 /InstallSidebar=0 /ParticipateProductImprovement=0 /DontRestart'
Set $Inst_Cmd64$ = '/UILevel=silent /InstallToolbar=0 /ChangeBrowserSearchProvider=0 /InstallSidebar=1 /ParticipateProductImprovement=0 /DontRestart'
Set $Uninst_Cmd$ = " /AppMode=SETUP /Maintenance=2 /UILevel=silent"
Set $Uninst_Prg$ = "\AVG10\avgmfapx.exe"
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
        isFatalError
        ; Stop process and set installation status to failed
else
        comment "Show product picture"
        ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$

;       if FileExists("%ScriptPath%\delsub.ins")
;               comment "Start uninstall sub section"
;               Sub "%ScriptPath%\delsub.ins"
;       endif

        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif

        comment "Installiere AVG..."

        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
                Message "Kopiere " + $ProductId$ + " nach "+$InstallDir32$+". Das dauert etwas, bitte Geduld..."
                comment "copying " + $ProductId$ + " nach "+$InstallDir32$+"
                Files_install_32
                Message "Installiere " + $ProductId$ + ". Das dauert etwas, bitte Geduld..."
                comment "Start setup program"
                Winbatch_install_32
                Files_delete_32
                Sub_check_exitcode
        endif

        if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))

                Message "Kopiere " + $ProductId$ + " nach "+$InstallDir32$+". Das dauert etwas, bitte Geduld..."
                comment "copying " + $ProductId$ + " nach "+$InstallDir32$+"
                Files_install_64
                Message "Installiere " + $ProductId$ + ". Das dauert etwas, bitte Geduld..."
                comment "Start setup program"
                Winbatch_install_64
                Files_delete_64
                Sub_check_exitcode
        endif

endif

[Winbatch_install_32]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$
;$InstallDir32$\install.bat " $InstallDir32$


[Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
"$InstallDir64$\install.bat " $InstallDir64$


[Files_install_32]
; Example of recursively copying some files into the installation directory:
;
;copy "%ScriptPath%\$Inst_Prg$" $InstallDir32$
;copy "%ScriptPath%\install.bat" $InstallDir32$

[Files_install_64]
; Example of recursively copying some files into the installation directory:
;
copy "%ScriptPath%\$Inst_Prg$" $InstallDir64$


[Files_delete_32]
; Example of recursively copying some files into the installation directory:
;
delete /s "$InstallDir32$\*.*"

[Files_delete_64]
; Example of recursively copying some files into the installation directory:
;
delete /s "$InstallDir64$\*.*"



[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
Ich habe beim Aufruf des Installationsprogramms in der Winbatch_Install 32 schon alles mögliche probiert. Wenn ich den Tracemodus einschalte, bekomme ich auch die richtigen Parameter übergeben:

Code: Alles auswählen

[5] [29.08.2011 21:34:39]     Execution of Winbatch_install_32
[6] [29.08.2011 21:34:39]       Call "p:\install\avgantivirus\avg.exe /UILevel=silent /InstallToolbar=0 /ChangeBrowserSearchProvider=0 /InstallSidebar=0 /ParticipateProductImprovement=0 /DontRestart"
[6] [29.08.2011 21:34:39]          Waiting until the called process is finished (HIER HABE ICH DIE INSTALLATION ABGEBROCHEN!)
[6] [29.08.2011 21:35:49]       ExitCode 3758215212    Executed process "p:\install\avgantivirus\avg.exe /UILevel=silent /InstallToolbar=0 /ChangeBrowserSearchProvider=0 /InstallSidebar=0 /ParticipateProductImprovement=0 /DontRestart"
Kann mir mal einer bitte malauf die Sprünge helfen?

Danke.

Thomas_H
Zuletzt geändert von Thomas_H am 31 Aug 2011, 08:48, insgesamt 1-mal geändert.
Kennst Du schon die WIKI für OPSI-Scripte? Fertige Installationsscripte bekommen und ablegen unter OPSI-Wiki
Aus dem Glashaus :) : UIB bietet auch Schulungen und Supportverträge für Opsi an.
Bild
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Unattended Installation funzt nicht (AVG 2011 Free)

Beitrag von d.oertel »

Hi,

was passiert, wenn Du das Winstscript als eingeloggter Administrator interaktiv aufrufst ?

gruss
d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Benutzeravatar
Thomas_H
Beiträge: 524
Registriert: 09 Jun 2010, 11:57
Wohnort: Havelland

Re: Unattended Installation funzt nicht (AVG 2011 Free)

Beitrag von Thomas_H »

Hallo Herr Oertel,

es funktioniert. Vorallem aber - wie ich im nachhinein feststellen musste - weil ein Update einen Neustart des Rechners forderte. Der dauerte lange, als der Desktop wieder da war, war auch AVG Free 2011 auf dem Desktop.
Ein neuer Versuch bestätigte meine Vermutung: Die zahlreichen Versuche und Abbrüche bei der Installation hatten was auch immer bereits hinterlassen. Kurz gesagt: Hat die Installation schon begonnen und wird sie -zB. durch einen Fehler abgebrochen, sollte man den Testrechner neu starten. Das ist zwar noch auwendiger, spart aber uU. mehr Zeit. Ich hab drei Tage aufgewendet... :(
Nun muss ich noch die Deinstallation hinbekommen und auch das Paket ist fertig.

Vielen Dank.

Thomas_H
Kennst Du schon die WIKI für OPSI-Scripte? Fertige Installationsscripte bekommen und ablegen unter OPSI-Wiki
Aus dem Glashaus :) : UIB bietet auch Schulungen und Supportverträge für Opsi an.
Bild
Antworten