User Tools

Site Tools


userspace:a_master_copy_for_inserting_scripts_-_eine_vorlage_um_einstellen_von_scripten

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userspace:a_master_copy_for_inserting_scripts_-_eine_vorlage_um_einstellen_von_scripten [2014/08/25 14:42]
GEI
userspace:a_master_copy_for_inserting_scripts_-_eine_vorlage_um_einstellen_von_scripten [2021/08/23 08:37] (current)
Line 1: Line 1:
 +\\
 +====== getProductMap.opsiinc ======
  
-====== check_install4j-exitcode.ins ====== 
  
 +Tested with opsi 4.0.4\\
 +requiredWinstVersion >= 4.11.2.\\
 +By //[[opsi@gei.de|GEI]] 2014/11/11 17:00//
  
-Tested with opsi 4.0.1\\ +placed in global library, such as %ScriptDrive$/lib ... 
-requiredWinstVersion >= 4.11.3.6\\ +call with  
-By //[[krummel@gei.de|GEI]] 2014/08/24 18:08// +<code winst
 +include_insert %ScriptDrive%/lib/getproductmap.opsiinc 
 +</code>
  
- +===  ===
-=== check_install4j-exitcode.ins ===+
 <code winst> <code winst>
-Exitcodes from:   +    This sourcecode is partly owned by uib.de 
-; http://resources.ej-technologies.com/install4j/help/doc/indexRedirect.html?http&&&resources.ej-technologies.com/install4j/help/doc/helptopics/installers/errors.html+    and published under the Terms of the General Public License. 
 +    ; credits: http://www.opsi.org/en/credits/ 
 +    ; 
 +    ; written by GEI (Detlef Krummel  opsi@gei.de) 
 +    ; FILE "%ScriptDrive%\lib\getproductmap.opsiinc"
  
-ExitCode from called installers +    requiredWinstVersion >="4.11.2" 
-set $ExitCode$ = getLastExitCode+    for debugging  setLogLevel = 7 
 +    DefStringList   $ProductMap_List$ 
 +    Set             $ProductMap_List$ = getProductMap 
 +    setLogLevel = 6 
 +    ; --------------------------------- sample values --------------------------------------------------- 
 +    ; 0)id=owncloud                         1)name=ownCloud                 2)description=Win-Cloudclient 
 +    ; 3)advice=(aktualisiert am 4.9.2014)   4)productversion=1.6.3.3721     5)packageversion=17 
 +    ; 6)priority=0                          7)installationstate=unknown     8)lastactionrequest=setup 
 +    ; 9)lastactionresult=successful         10)installedversion=1.6.2.      11)installedpackage=16 
 +    ;12)installedmodificationtime=          13)actionrequest=setup
  
-setLogLevel = 4 +    DefVar          $ProductMap_Id$ 
-if ($ExitCode$ = "0") +    Set             $ProductMap_Id                        getValue("id",                        $ProductMap_List$
- comment "ExitCode = "+$ExitCode$+" Normal execution (no error)" +    DefVar          $ProductMap_Name$ 
-else +    Set             $ProductMap_Name$                       getValue("name",                      $ProductMap_List$) 
- if ($ExitCode$ = "1") +    DefVar          $ProductMap_Description$ 
- logError "ExitCode = "+$ExitCode$+Installation fails+    Set             $ProductMap_Description               getValue("description",               $ProductMap_List$
- IsFatalError +    DefVar          $ProductMap_Advice$ 
- else +    Set             $ProductMap_Advice$                     getValue("advice",                    $ProductMap_List$
- if ($ExitCode$ = "83") +    DefVar          $ProductMap_ProductVersion$ 
- logError "ExitCode = "+$ExitCode$+failed - installer could not find a suitable JVM to run+    Set             $ProductMap_ProductVersion$             = getValue("productversion",            $ProductMap_List$) 
- IsFatalError +    DefVar          $ProductMap_PackageVersion$ 
- else +    Set             $ProductMap_PackageVersion            getValue("packageversion",            $ProductMap_List$
- logError "ExitCode = "+$ExitCode$+unknown error+    DefVar          $ProductMap_Priority$ 
- endif +    Set             $ProductMap_Priority$                   getValue("priority",                  $ProductMap_List$
- endif +    DefVar          $ProductMap_InstallationState$ 
-endif +    Set             $ProductMap_InstallationState$          = getValue("installationstate",         $ProductMap_List$) 
-setLogLevel 6+    DefVar          $ProductMap_LastActionRequest$ 
 +    Set             $ProductMap_LastActionRequest$          = getValue("lastactionrequest",         $ProductMap_List$) 
 +    DefVar          $ProductMap_LastActionResult$ 
 +    Set             $ProductMap_LastActionResult$           = getValue("lastactionresult",          $ProductMap_List$) 
 +    DefVar          $ProductMap_InstalledVersion$ 
 +    Set             $ProductMap_InstalledVersion$           getValue("installedversion",          $ProductMap_List$
 +    DefVar          $ProductMap_InstalledPackage$ 
 +    Set             $ProductMap_InstalledPackage$           = getValue("installedpackage",          $ProductMap_List$) 
 +    DefVar          $ProductMap_InstalledModificationTime$ 
 +    Set             $ProductMap_InstalledModificationTime$  = getValue("installedmodificationtime", $ProductMap_List$) 
 +    DefVar          $ProductMap_ActionRequest$ 
 +    Set             $ProductMap_ActionRequest$              getValue("actionrequest",             $ProductMap_List$)
 </code> </code>
  
-==== Steps ==== +==== sample ====
-  - save this script to %ScriptDrive% or %ScriptPath% +
-  - call this check with Sub "%ScriptDrive%\check_install4j-exitcode.ins"  +
-  - Install4j-Setup-Installer used by Java-Programs example Spark (Messenger) +
- +
-[[opsiscript templates|check_install4j-exitcode.ins]] +
  
 +  (include before)
 +<code winst>
 +  set $Setupfile$ = "ownCloud-" + $ProductMap_ProductVersion$ + "-setup.exe"
 +</code>
  
userspace/a_master_copy_for_inserting_scripts_-_eine_vorlage_um_einstellen_von_scripten.1408977735.txt.gz · Last modified: 2021/08/23 08:37 (external edit)