Seite 2 von 2
Re: Fehler Skript Flashplayer
Verfasst: 05 Mai 2010, 16:56
von anickenig
Anpassungen hab ich nur im /home/opsiproducts gemacht
danach dann eben das paket neu gepackt und neu frei gegeben.
2 dinge die mich dabei wundern.
1. im Verzeichnis welches dann auf dem Client als P: gemapped wird ist das Files Verzeichnis nicht vorhanden sondern alle Dateien liegen in der Root.
2. Trotz mehrfacher Kontrolle ist die sub delsub.ins fehlerhaft. hab nun einfach die delsub.ins komplett raus geschmissen.
Re: Fehler Skript Flashplayer
Verfasst: 05 Mai 2010, 23:42
von COMaction
Hallo,
mal eine Frage, für was ist die delsub.ins eigentlich? Ich weiß einfach nicht wo ich Sie im opsi-newprod angeben soll. Was bewirkt die Datei. Im Skript lese ich das immer so als ruft Sie eine uninstall Routine aus.
Grüße
Michael
Re: Fehler Skript Flashplayer
Verfasst: 06 Mai 2010, 10:51
von anickenig
soweit ich es verstanden habe, ist es nur ein Unterprogramm ( Sub ) und die muss nicht in Newprod mit angelegt werden.
Re: Fehler Skript Flashplayer
Verfasst: 01 Dez 2010, 21:27
von chewbacca
Hallo,
es ist mein erster Post hier. Da ich auch auf der Suche war nach neueren winInst Skripten, poste ich mal meine angepassten. Die Silentschalter haben sich seit v.10 geändert, auch hatte ich mit den Deinstaller Probleme. Leider wird das WinInst wiki ja nicht mehr weitergeführt, deswegen werde ich mal regelmäßig meine Skripte posten.
delflashplayer.ins
Code: Alles auswählen
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
[Initial]
requiredWinstVersion >= "4.8.6"
LogLevel=2
; 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
[Aktionen]
DefVar $TEMP$
Set $TEMP$ = EnvVar("TEMP")
DefVar $LogDir$
Set $LogDir$ = "%SystemDrive%\tmp"
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $LicenseRequired$
DefVar $LicensePool$
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "flashplayer"
Set $InstallDir$ = "%ProgramFilesDir%\" + $ProductId$
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
comment "Show product picture"
ShowBitmap /3 "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
endif
if not ($LicenseRequired$ = "false")
comment "Licensing required, free license used"
Sub_free_license
endif
[Sub_free_license]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
else
LogError "Error: licensing required, but license management not enabled"
isFatalError
endif
delsub.ins
Code: Alles auswählen
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%System%\Macromed\Flash\FlashUtil10l_Plugin.exe")
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_plug
sub_check_exitcode_plug
else
comment "No uninstall program found, start to install"
endif
if FileExists("%System%\Macromed\Flash\FlashUtil10l_ActiveX.exe")
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_act
sub_check_exitcode_act
else
comment "No uninstall program found, start to install"
endif
[Winbatch_uninstall_act]
"%System%\Macromed\Flash\FlashUtil10l_ActiveX.exe" /uninstall
[Winbatch_uninstall_plug]
"%System%\Macromed\Flash\FlashUtil10l_Plugin.exe" /uninstall
[Sub_check_exitcode_act]
comment "Test for installation success via exit code"
DefVar $ExitCodeAct$
set $ExitCodeAct$ = 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 ($ExitCodeAct$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCodeAct$
if ($ExitCodeAct$ = "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 ($ExitCodeAct$ = "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 ($ExitCodeAct$ = "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: " + $ExitCodeAct$
isFatalError
endif
endif
endif
endif
DefVar $ExitCodePlug$
set $ExitCodePlug$ = getLastExitCode
[Sub_check_exitcode_plug]
comment "Test for installation success via exit code"
DefVar $ExitCodePlug$
set $ExitCodePlug$ = 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 ($ExitCodePlug$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCodePlug$
if ($ExitCodePlug$ = "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 ($ExitCodePlug$ = "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 ($ExitCodePlug$ = "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: " + $ExitCodePlug$
isFatalError
endif
endif
endif
endif
flashplayer.ins
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]
requiredWinstVersion >= "4.8.6"
LogLevel=2
; 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
[Aktionen]
ShowBitmap /3 "%scriptpath%\flashplayer.png" "Adobe Flashplayer 10"
;Variable fuer temporaeres Verzeichnis
DefVar $Temp$
set $Temp$ = EnvVar("TEMP")
;Variablen fuer BetriebssystemsVersion (OS)-Test
DefVar $OS$
DefVar $MinorOS$
set $OS$ = GetOS
set $MinorOS$ = GetNTVersion
DefVar $ProductId$
Set $ProductId$ = "flashplayer"
DefVar $MinimumSpace$
Set $MinimumSpace$ = "50 MB"
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 /3 "%scriptpath%\flashplayer.png" $ProductId$
if FileExists("%scriptpath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%scriptpath%\delsub.ins"
endif
if ( $OS$ = "Windows_NT" )
Message "Installing " + $ProductId$ + " ..."
Files_copy
Winbatch_unattended_install
Files_Delete
endif
if (IniVar("NoAutoUpdate") = "on")
Files_copy_noautoupdate
else
Files_delete_noautoupdate
endif
endif
[Files_copy]
checktargetpath="$TEMP$\flashplayer"
copy -svx "%scriptpath%\files\"
[Winbatch_unattended_install]
$TEMP$\flashplayer\install_flash_player.exe -install
$TEMP$\flashplayer\install_flash_player_ax.exe -install
[Files_Delete]
delete -sf $TEMP$\flashplayer\
[Files_copy_noautoupdate]
copy -svx "%scriptpath%\files\mms.cfg" "%SYSTEM%\Macromed\Flash"
[Files_delete_noautoupdate]
delete -sf "%SYSTEM%\Macromed\Flash\mms.cfg"