ich möchte eigene Software (firefox3.6.0) über opsi installieren lassen.
habe bereits folgende Befehle durchlaufen lassen:
Code: Alles auswählen
cd /home/opsiproducts
opsi-package-manager --new-product-id firefox3.6.0 -x opsi-template_1.0-15.opsi
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]
DefVar $TEMP$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $NewExe$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
; This should be edited
set $ProductId$ = "firefox3.6.0"
set $MinimumSpace$ = "100 MB"
set $InstallDir$="D:\"+$ProductId$
set $NewExe$=$InstallDir$+"\"+$ProductId$+".exe"
set $LicenseRequired$ = "false"
set $LicensePool$ = "p_" + $ProductId$
Set $TEMP$ = EnvVar("TEMP")
; Message at install time:
Message "Installing "+$ProductId$+" ..."
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%\"+$ProductId$+".bmp" $ProductId$
if FileExists("%ScriptPath%\delsub.ins")
comment "start uninstall sub section"
sub "%ScriptPath%\delsub.ins"
endif
;Message at install time:
Message "Installing "+$ProductId$+" ..."
comment "if license management enabled, reserve license and get license key"
if ($LicenseRequired$ = "true")
sub_get_licensekey
endif
comment "start setup program"
Winbatch_install
sub_check_exitcode
comment "copy files"
Files_install
comment "set Registry"
Registry_install
comment "set start menu"
LinkFolder_install
comment "test for installation success"
if not(FileExists($NewExe$))
logError "Fatal: After Installation "+$NewExe$+" not found"
isFatalError
endif
endif
[Winbatch_install]
; something like
"%SCRIPTPATH%\Setup.exe" /S
; $licensekey$ may be inserted into the additional parameters string
[Files_install]
; something like
; copy -sv "%SCRIPTPATH%\files\*.*" "%ProgramFilesDir%\$ProductId$"
[Registry_install]
; something like
; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
; set "key"="value"
[LinkFolder_install]
; something like
; set_basefolder common_programs
; set_subfolder $ProductId$
;
; set_link
; name: $ProductId$
; target: $NewExe$
; parameters:
; working_dir: $InstallDir$
; icon_file:
; icon_index:
; end_link
[sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "license management is enabled and will be used"
comment "try to to get license key"
Set $licensekey$ = demandLicenseKey ($licensepool$)
; if there is an assignment of exactly one licensepool to the product the following call is possible:
; Set $licensekey$ = demandLicenseKey ("", $ProductId$)
; if there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $windowsSoftwareId$
; $windowsSoftwareId$ = "..."
; Set $licensekey$ = demandLicenseKey ("", "", $windowsSoftwareId$)
DefVar $serviceErrorClass$
set $serviceErrorClass$ = getLastServiceErrorClass
comment "error class: " + $serviceErrorClass$
if $serviceErrorClass$ = "None"
comment "everything fine"
comment "we got the license key '" + $licensekey$ + "'"
else
if $serviceErrorClass$ = "LicenseConfigurationError"
LogError "Fatal: license configuration must be corrected"
LogError getLastServiceErrorMessage
isFatalError
else
if $serviceErrorClass$ = "LicenseMissingError"
LogError "Fatal: required license is not supplied"
isFatalError
endif
endif
endif
else
LogError "Fatal: license required, but license management not enabled"
isFatalError
endif
[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
opsi-makeproductfile
opsi-package-manager -i firefox3.6.0_1.0-15.opsi
winst startet ganz normal und beginnt die Installation
nach kurzer Zeit wird die Installation beendet mit "Process stopped"
jetzt wenn ich mich einlogge, sehe ich ein Installierten Firefox, der aber unter dem standard-firefox-pfad installiert wurde, und der opsi configuration editor meldet mir fehler.
Also ich denke mal, dass er das setup startet, aber nicht die angegebenen pfade usw. nutzt....
wie ändere ich das?