User Tools

Site Tools


userspace:origin

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:origin [2013/12/13 08:02]
tobias [additional_sections.opsiinc]
userspace:origin [2021/08/23 08:37] (current)
Line 1: Line 1:
-\\ 
-**This is a master copy. Click on <edit this page> and copy the contents under "snipp". Then create the page for your own script, paste the content to the editor and modify it as you need it.** 
- 
 ====== Origin Ver. 9.1 MSI Installer ====== ====== Origin Ver. 9.1 MSI Installer ======
  
  
-Tested with opsi X.Y.Z\\ +
-requiredWinstVersion >= W.X.Y.Z\\+
 Files can be downloaded at Download here: [[http://www.originlab.com/index.aspx?go=products&pid=1852|Download]] Files can be downloaded at Download here: [[http://www.originlab.com/index.aspx?go=products&pid=1852|Download]]
  
-By  <click on the button signature> +By   --- //[[tobias.friede@wki.fraunhofer.de|tobias]] 2013/12/13 09:08//
  
 Tree:\\ Tree:\\
Line 58: Line 54:
 ==== What you need ==== ==== What you need ====
   *the MSI Installer from Additive (64bit + 32bit)   *the MSI Installer from Additive (64bit + 32bit)
-  *the MSI files from VISUAL C++ 2012 REDISTRIBUTABLE [[http://http://www.applepie.se/extract-msi-from-visual-c-2012-redistributable|How to get the MSI Installer:]]+  *the MSI files from VISUAL C++ 2012 REDISTRIBUTABLE (64bit + 32bit) [[http://http://www.applepie.se/extract-msi-from-visual-c-2012-redistributable|How to get the MSI Installer:]]
   *the MSI files from VISUAL C++ 2008 REDISTRIBUTABLE (64bit + 32bit)   *the MSI files from VISUAL C++ 2008 REDISTRIBUTABLE (64bit + 32bit)
  
  
-[[nix|Change the following headlines to the names of your scripts]] 
  
 ==== additional_actions.opsiinc ==== ==== additional_actions.opsiinc ====
Line 110: Line 105:
 ==== config.opsiinc ==== ==== config.opsiinc ====
 <code winst> <code winst>
-click on "edit this page" to see the complete source.+; ---------------------------------------------------------------- 
 +; -  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$         = "Origin9.1" 
 +Set $MinimumSpace$      = "500 MB" 
 +set $setupcommand32$    =  "msiexec /i %ScriptPath%\files\MSI\Origin91_x86\setup.msi  /passive ALLUSERS=2 REBOOT=ReallySuppress PIDKEY=SF8T5-3089-7902407" 
 +set $setupcommand64$    =  "msiexec /i %ScriptPath%\files\MSI\Origin91_x64\setup.msi  /passive ALLUSERS=2 REBOOT=ReallySuppress PIDKEY=SF8T5-3089-7902407" 
 + 
 +Set $INST_SystemType$   = GetSystemType 
 +set $INST_architecture$ = GetProductProperty("install_architecture","system specific"
 +Set $LogDir$            = "%SystemDrive%\tmp" 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; -  Currently installing MSIs 
 +; ---------------------------------------------------------------- 
 + 
 +set $installed_MSI_32$          = createStringList (' ') 
 + 
 +set $installed_MSI_64$          = createStringList ('{3C28BFD4-90C7-3138-87EF-418DC16E9598}','{5AF4E09F-5C9B-3AAF-B731-544D3DC821DD}','{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}'
 + 
 +set $installed_MSI_Both$        = createStringList ('{912C907D-E18C-4560-859B-2B1EA969BAB5}','{E824E81C-80A4-3DFF-B5F9-4842A9FF5F7F}','{6C772996-BFF3-3C8C-860B-B3D48FF05D65}','{9BE518E6-ECC6-35A9-88E4-87755C07200F}'
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; -  MSIID MAPP / Aktuelle MSIIDs 
 +; ---------------------------------------------------------------- 
 +;32 
 +; - 
 + 
 +;64 
 +;Origin91_x64 - {912C907D-E18C-4560-859B-2B1EA969BAB5} 
 +;vcredist_x64-2012 Additional - {3C28BFD4-90C7-3138-87EF-418DC16E9598} 
 +;vcredist_x64-2012 Minimum - {5AF4E09F-5C9B-3AAF-B731-544D3DC821DD} 
 +;vcredist_x64_2008 - {5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4} 
 + 
 +;Both    
 +;Origin91_x86 - {912C907D-E18C-4560-859B-2B1EA969BAB5} 
 +;vcredist_x86-2012 Additional - {6C772996-BFF3-3C8C-860B-B3D48FF05D65} 
 +;vcredist_x86-2012 Minimum - {E824E81C-80A4-3DFF-B5F9-4842A9FF5F7F} 
 +;vcredist_x86-2008 - {9BE518E6-ECC6-35A9-88E4-87755C07200F} 
 + 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; -  MSIs from outdated packages 
 +; ---------------------------------------------------------------- 
 +set $MSI_32$    = createStringList ('{9DE4251D-D6A0-445B-A006-42F20D46CB62}'
 + 
 +set $MSI_64$    = createStringList (' ') 
 + 
 +set $MSI_Both$  = createStringList (' ') 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; -  Additional Configuration 
 +; ---------------------------------------------------------------- 
 +set $checktask$         = "false" 
 +set $killtask$          = "false" 
 +set $SearchProcess$     = createStringList ('cmd.exe'
 + 
 + 
 </code> </code>
  
 ==== delsub.ins ==== ==== delsub.ins ====
 <code winst> <code winst>
-;this is my vbs-script... +; ---------------------------------------------------------------- 
-echo click on "edit this page" to see the complete source.+; - 32Bit                            - 
 +; ---------------------------------------------------------------- 
 + 
 + 
 + 
 +if ($INST_SystemType$ = "x86 System"
 + Message "Uninstalling " + $ProductId$ + " 32 Bit...
 + 
 + 
 +        if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\+ $ID$ + "] DisplayName") = ""
 + comment "MSI id " + $ID$ + " found in registry, starting msiexec to uninstall" 
 + Winbatch_uninstall_msi 
 + sub_check_exitcode 
 +        endif 
 +endif 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; - 64Bit                         - 
 +; ---------------------------------------------------------------- 
 + 
 + 
 + 
 +if ($INST_SystemType$ = "64 Bit System"
 + Message "Uninstalling " + $ProductId$ + " 64 Bit..." 
 + 
 + 
 +        if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $ID$ + "] DisplayName") = ""
 + comment "MSI id " + $ID$ + " found in registry, starting msiexec to uninstall" 
 + Winbatch_uninstall_msi 
 + sub_check_exitcode 
 +        endif 
 +endif 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; - Both                         - 
 +; ---------------------------------------------------------------- 
 + 
 + Message "Uninstalling " + $ProductId$ + " Both..." 
 + 
 + 
 +if not (GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $ID$ + "] DisplayName") = ""
 + comment "MSI id " + $ID$ + " found in registry, starting msiexec to uninstall" 
 + Winbatch_uninstall_msi 
 + sub_check_exitcode 
 +endif 
 + 
 + 
 + 
 + 
 +[Winbatch_uninstall_msi] 
 +msiexec /x $ID$ /qb! REBOOT=ReallySuppress 
 + 
 + 
 + 
 + 
 +[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 installThis message is indicative of a success." 
 + else 
 + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ 
 + isFatalError 
 + endif 
 + endif 
 + endif 
 +endif 
 </code> </code>
  
 ==== setup.ins ==== ==== setup.ins ====
 <code winst> <code winst>
-;this is my vbs-script... +[Actions] 
-echo click on "edit this page" to see the complete source.+ 
 + 
 +SetLogLevel=6 
 + 
 +requiredWinstVersion >= "4.10.8.6" 
 + 
 +Include configuration 
 +include_insert "%scriptpath%\vars.opsiinc" 
 +include_insert "%scriptpath%\config.opsiinc" 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; - PreCheck & Settings 
 +; ---------------------------------------------------------------- 
 + 
 + 
 +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$ + ".png" $ProductId$ 
 +endif  
 + 
 + 
 +if ( $checktask$  = "true"
 +        for %s% in $SearchProcess$ do sub_checktask 
 +else 
 +        comment "Checktask is off" 
 +endif 
 + 
 + 
 + 
 + 
 +---------------------------------------------------------------- 
 +; - Remove Aktionen 
 +; ---------------------------------------------------------------- 
 + 
 +comment "Remove MSI from System" 
 + 
 +if ($INST_SystemType$ = "x86 System"
 +    for %s% in $MSI_32$ do sub_open_dellsub 
 + 
 +else 
 + 
 +    for %s% in $MSI_64$ do sub_open_dellsub 
 + 
 +endif 
 + 
 +    for %s% in $MSI_Both$ do sub_open_dellsub 
 + 
 + 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; - Setup Aktionen 
 +; ---------------------------------------------------------------- 
 + 
 +if ($INST_SystemType$ = "x86 System")  
 + Message "Installing " + $ProductId$ + " 32 Bit...
 + comment "Start setup program" 
 + Winbatch_install_32 
 + Sub_check_exitcode 
 +endif 
 + 
 + 
 +if ($INST_SystemType$ = "64 Bit System")  
 + Message "Installing " + $ProductId$ + " 64 Bit..." 
 + comment "Start setup program" 
 + Winbatch_install_64 
 + Sub_check_exitcode 
 +endif 
 + 
 +include_append "%scriptpath%/additional/additional_sections.opsiinc"  
 +include_insert "%scriptpath%/additional/additional_actions.opsiinc" 
 + 
 + 
 + 
 + 
 + 
 +; ---------------------------------------------------------------- 
 +; - Sektionen 
 +; ---------------------------------------------------------------- 
 + 
 + 
 + 
 +[Winbatch_install_32] 
 + 
 +$setupcommand32$ 
 + 
 + 
 + 
 +[Winbatch_install_64] 
 + 
 +$setupcommand64$ 
 + 
 + 
 +[sub_open_dellsub] 
 +set $ID$ = "%s%" 
 +Sub "%ScriptPath%\delsub.ins" 
 + 
 + 
 +[sub_checktask] 
 +set $currentchecktask$ = "%s%" 
 +set $tasklist$ = getOutStreamFromSection('DosInAnIcon_checkprocess'
 +set $processVAR$ = unquote(takeString(1,$tasklist$), '"'
 + 
 +if ($processVAR$ = $currentchecktask$) 
 +Message = "Prozess gefunden" 
 + if ($killtask$ = "true"
 + killtask $currentchecktask$ 
 + else 
 + message "killtask is set to false" 
 +  
 + endif 
 + if ($fatalerror$ = "true"
 + pause  $userfail$ 
 + isFatalError 
 +  
 + else 
 + message "fatalError is set to false" 
 + endif 
 +  
 +message  "Prozess nicht gefunden - do nothing" 
 +endif 
 +  
 + 
 +[DosInAnIcon_checkprocess] 
 +@echo off 
 +TASKLIST /FI "IMAGENAME eq $subvar$/fo CSV 
 + 
 + 
 +[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 installThis message is indicative of a success." 
 + else 
 + logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ 
 + isFatalError 
 + endif 
 + endif 
 + endif 
 +endif
 </code> </code>
  
 ==== uninstall.ins ==== ==== uninstall.ins ====
 <code winst> <code winst>
-;this is my vbs-script... +[Actions] 
-echo click on "edit this pageto see the complete source.+ 
 +SetLogLevel=6 
 + 
 +requiredWinstVersion >= "4.10.8.6" 
 + 
 +include_insert "%scriptpath%\vars.opsiinc" 
 +include_insert "%scriptpath%\config.opsiinc" 
 + 
 +comment "Show product picture" 
 +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ 
 +  
 + 
 + 
 +comment "Remove MSI from System" 
 + 
 +if ($INST_SystemType$ = "x86 System"
 +    for %s% in $installed_MSI_32$ do sub_open_dellsub 
 + 
 +else 
 + 
 +    for %s% in $installed_MSI_64$ do sub_open_dellsub 
 + 
 +endif 
 + 
 +for %s% in $installed_MSI_Both$ do sub_open_dellsub 
 + 
 + 
 + 
 +[sub_open_dellsub] 
 +set $ID$ = "%s%" 
 +Sub "%ScriptPath%\delsub.ins"
 </code> </code>
  
 ==== vars.ins ==== ==== vars.ins ====
 <code winst> <code winst>
-;this is my vbs-script... + 
-echo click on "edit this page" to see the complete source.+; ---------------------------------------------------------------- 
 +; - DefVar / DefString  
 +; ---------------------------------------------------------------- 
 + 
 +DefVar $MsiId32$ 
 +DefVar $MsiId64$ 
 +DefVar $LogDir$ 
 +DefVar $ProductId$   
 +DefVar $MinimumSpace$ 
 +DefVar $InstallDir32$ 
 +DefVar $InstallDir64$ 
 +DefVar $ExitCode$ 
 +DefVar $INST_SystemType$ 
 +DefVar $INST_architecture$ 
 +DefVar $setupcommand32$ 
 +DefVar $setupcommand64$ 
 +DefVar $ID$ 
 +DefVar $subvar$ 
 +DefVar $killtask$ 
 +DefVar $checktask$ 
 + 
 + 
 +DefStringList $MSI_32$ 
 +DefStringList $MSI_64$ 
 +DefStringList $MSI_Both$ 
 +DefStringlist $installed_MSI_Both$ 
 +DefStringList $installed_MSI_32$ 
 +DefStringList $installed_MSI_64$ 
 +DefStringList $processlist$ 
 +DefStringList $process$ 
 +DefStringList $process_unquote$ 
 +DefStringList $SearchProcess$ 
 +DefStringList $currentchecktask$ 
 +DefStringList $processVAR$ 
 + 
 </code> </code>
userspace/origin.1386921760.txt.gz · Last modified: 2021/08/23 08:37 (external edit)