User Tools

Site Tools


userspace:wps-office

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:wps-office [2019/05/15 11:57]
Thomas_H
userspace:wps-office [2021/08/23 08:37] (current)
Line 4: Line 4:
 requiredWinstVersion >= 4.8.6\\ requiredWinstVersion >= 4.8.6\\
 questions to:  //[[thomas.heinrich@polizei.berlin.de|Thomas_H]] 2019/05/15 12:45// \\ questions to:  //[[thomas.heinrich@polizei.berlin.de|Thomas_H]] 2019/05/15 12:45// \\
 +
 Special thanks to Mossi, [[https://www.hofmann-robert.info/computer/2017/09/19/selbstextrahierendes-archiv-mit-7-zip-erstellen.html | Robert Hofmann]] \\ Special thanks to Mossi, [[https://www.hofmann-robert.info/computer/2017/09/19/selbstextrahierendes-archiv-mit-7-zip-erstellen.html | Robert Hofmann]] \\
 +Special thanks to Simon Monteneau [[https://wapt.lesfourmisduweb.org/details-package?package=smp-wpsoffice-free_10.2.0.7587-4_all.wapt | 
 +Dépôt WAPT Les Fourmis Du Web ]] (Merci beaucoup) \\
 +
 The installation-files can be downloaded from: http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/10.2.0.7646/WPSOffice_10.2.0.7646_Free.exe// The installation-files can be downloaded from: http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/10.2.0.7646/WPSOffice_10.2.0.7646_Free.exe//
  
Line 15: Line 19:
 So we have to change some things in the installation pack to force the setup to behave as we need it. So we have to change some things in the installation pack to force the setup to behave as we need it.
 Once done this change, the rest is easy and we can install the new file with opsi as well known. Once done this change, the rest is easy and we can install the new file with opsi as well known.
 +
 +==== Urgently needed ====
 +
 +  - a pot of coffee or tea
 +  - nerve food like chocolat
 +  - nerves of steel
 +  - understanding wife or colleague
 +  - NO KIDS AROUND!
 +  - 7Zip
 +  - any Editor, which can save text in UTF-8-format
  
  
Line 66: Line 80:
          Compression method: LZMA2 (this is why we have to add the 7zsd_LZMA2_x64.sfx to our working-dir)          Compression method: LZMA2 (this is why we have to add the 7zsd_LZMA2_x64.sfx to our working-dir)
                    
-         The filename I have chosen was "WPS-Office_10.2.0.7646_Free.7z"+         The filename I have chosen was "WPSOffice_10.2.0.7646_Free.7z"
      20) Click OK and let 7Zip create your archive.      20) Click OK and let 7Zip create your archive.
      21) Now the contents of your working-dir should look like this:      21) Now the contents of your working-dir should look like this:
Line 75: Line 89:
         ├ 7zsd_LZMA2_x64.sfx         ├ 7zsd_LZMA2_x64.sfx
         ├ config.txt         ├ config.txt
-        └ WPS-Office_10.2.0.7646_Free.7z (or what name ever you gave the 7z-Archive)+        └ WPSOffice_10.2.0.7646_Free.7z (or what name ever you gave the 7z-Archive)
                  
       22) Open a CMD and change into your working-dir       22) Open a CMD and change into your working-dir
Line 100: Line 114:
  
 <code winst> <code winst>
-; Copyright (c) uib gmbh (www.uib.de) +; Copyright (c) uib gmbh (www.uib.de)                                                                                                                                                                            
-; This sourcecode is owned by uib +; This sourcecode is owned by uib                                                                                                                                                                                
-; and published under the Terms of the General Public License. +; and published under the Terms of the General Public License.                                                                                                                                                   
-; credits: http://www.opsi.org/credits/ +; credits: http://www.opsi.org/credits/                                                                                                                                                                          
- +                                                                                                                                                                                                                 
-[Initial] +[Initial]                                                                                                                                                                                                        
-SetLogLevel=9 +SetLogLevel=9                                                                                                                                                                                                    
-;  Log Errors in Logfile but don't abort: +;  Log Errors in Logfile but don't abort:                                                                                                                                                                        
-ExitOnError=false +ExitOnError=false                                                                                                                                                                                                
-; Show syntax errors in the script: +; Show syntax errors in the script:                                                                                                                                                                              
-ScriptErrorMessages=on +ScriptErrorMessages=on                                                                                                                                                                                           
-; Dont trace step by step through the script: +; Dont trace step by step through the script:                                                                                                                                                                    
-TraceMode=off +TraceMode=off                                                                                                                                                                                                    
-; let started programs run in front of the winst window +; let started programs run in front of the winst window                                                                                                                                                          
-StayOnTop=false +StayOnTop=false                                                                                                                                                                                                  
- +                                                                                                                                                                                                                 
- +                                                                                                                                                                                                                 
-[Actions] +[Actions]                                                                                                                                                                                                        
-requiredWinstVersion >= "4.10.8.6" +requiredWinstVersion >= "4.10.8.6"                                                                                                                                                                               
- +                                                                                                                                                                                                                 
-DefVar $LogDir$ +DefVar $LogDir$                                                                                                                                                                                                  
-DefVar $ProductId$ +DefVar $ProductId$                                                                                                                                                                                               
-DefVar $Picture$+DefVar $Picture$                                                                                                                                                                                                
 DefVar $MinimumSpace$ DefVar $MinimumSpace$
 DefVar $InstallDir32$ DefVar $InstallDir32$
Line 153: Line 167:
 Set $Version$         = "10.2.0.7646" Set $Version$         = "10.2.0.7646"
 Set $MinimumSpace$    = "100 MB" Set $MinimumSpace$    = "100 MB"
-Set $Picture$       = "wps-office.jpg" +Set $Picture$         = "wps-office.jpg" 
-; the path were we find the product after the installation - not needed here, because of the oem.ini!+; the path were we find the product after the installation
 ;Set $InstallDir32$      = "%ProgramFiles32Dir%\<programmordner>\" ;Set $InstallDir32$      = "%ProgramFiles32Dir%\<programmordner>\"
 ;Set $InstallDir64$      = "%ProgramFiles64Dir%\<programmordner>\" ;Set $InstallDir64$      = "%ProgramFiles64Dir%\<programmordner>\"
Line 170: Line 184:
  
 if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
- LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ +        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ 
- isFatalError +        isFatalError 
- ; Stop process and set installation status to failed+        ; Stop process and set installation status to failed
 else else
-  
- if FileExists("$InstallDir32$$Uninst_Prg") 
- comment "Start uninstall sub section" 
- Sub "%ScriptPath%\delsub.ins" 
- endif 
- if FileExists("$InstallDir64$$Uninst_Prg") 
- 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 "+$ProductID$+"..." 
  
- if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only"+        if FileExists("$InstallDir32$$Uninst_Prg"
- Message "Installiere " + $ProductId$+" (32 Bit)" +                comment "Start uninstall sub section" 
- comment "Start setup program" +                Sub "%ScriptPath%\delsub.ins" 
- Winbatch_install_32 +        endif 
- Sub_check_exitcode +        if FileExists("$InstallDir64$$Uninst_Prg"
- endif+                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 "+$ProductID$+"..." 
 + 
 +        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only"
 +                Message "Installiere " + $ProductId$+" (32 Bit)" 
 +                comment "Start setup program" 
 +                Winbatch_install_32 
 +                LinkFolder_install 
 +                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 "Installiere " + $ProductId$+" (64 Bit)" 
 +                comment "Start setup program" 
 +                Winbatch_install_64 
 +                LinkFolder_install 
 +                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 "Installiere " + $ProductId$+" (64 Bit)" 
- comment "Start setup program" 
- Winbatch_install_64 
- Sub_check_exitcode 
- endif 
-  
 endif endif
  
Line 214: Line 230:
 %ScriptPath%\$Inst_Prg64$ $Inst_Cmd$ %ScriptPath%\$Inst_Prg64$ $Inst_Cmd$
  
 +[LinkFolder_install]
 +set_basefolder common_programs
 +set_subfolder $ProductId$
 +
 +set_link
 +name: "WPS-Office Writer"
 +target: "%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\wps.exe"
 +parameters:
 +working_dir:"%ProgramFiles32Dir%\WPS-Office\"
 +icon_file:"%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\wps.exe"
 +end_link
 +set_link
 +name: "WPS-Office Spreadsheet"
 +target: "%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\et.exe"
 +parameters:
 +working_dir:"%ProgramFiles32Dir%\WPS-Office\"
 +icon_file:"%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\et.exe"
 +end_link
 +set_link
 +name: "WPS-Office Presentations"
 +target: "%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\wpp.exe"
 +parameters:
 +working_dir:"%ProgramFiles32Dir%\WPS-Office\"
 +icon_file:"%ProgramFiles32Dir%\WPS-Office\10.2.0.7646\office6\wpp.exe"
 +end_link
  
 [Sub_check_exitcode] [Sub_check_exitcode]
Line 219: Line 260:
 set $ExitCode$ = getLastExitCode set $ExitCode$ = getLastExitCode
 if ($ExitCode$ = "0") if ($ExitCode$ = "0")
- comment "Looks good: setup program gives exitcode zero"+        comment "Looks good: setup program gives exitcode zero"
 else else
- comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ +        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ 
- if ($ExitCode$ = "1605"+        if ($ExitCode$ = "1605"
- comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." +                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" +                comment "Uninstall of a not installed product failed - no problem" 
- else +        else 
- if ($ExitCode$ = "1641"+                if ($ExitCode$ = "1641"
- comment "looks good: setup program gives 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." +                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success." 
- else +                else 
- if ($ExitCode$ = "3010"+                        if ($ExitCode$ = "3010"
- comment "looks good: setup program gives 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." +                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success." 
- else +                        else 
- logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ +                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ 
- isFatalError +                                isFatalError 
- endif +                        endif 
- endif +                endif 
- endif+        endif
 endif endif
 +
 </code> </code>
  
Line 258: Line 300:
 DefVar $ExitCode$ DefVar $ExitCode$
 DefVar $NTVersioninfo$ DefVar $NTVersioninfo$
-DefVar $uninstallstring$ 
 DefVar $Parameter$ DefVar $Parameter$
 DefVar $Picture$ DefVar $Picture$
Line 268: Line 309:
 ; ---------------Define some Variables here ---------------------- ; ---------------Define some Variables here ----------------------
 Set $ProductId$       = "WPS-Office" Set $ProductId$       = "WPS-Office"
-Set $Picture$       = "wps-office.jpg" +Set $Picture$         = "wps-office.jpg" 
-Set $Version$       = "10.2.0.7646" +Set $Version$         = "10.2.0.7646" 
-Set $UninstPrg$       ""%ProgramFiles64Dir%\$ProductID$\$Version$\utility\uninst.exe+Set $UninstPrg$       = "%ProgramFilesDir%\" + $ProductId+ "\$Version$\utility\uninst.exe" 
-Set $uninstallstring$ = "\$UninstPrg+Set $Parameter$       = "/S"
-Set $Parameter$       = " /S"+
 ; ---------------------------------------------------------------- ; ----------------------------------------------------------------
  
Line 279: Line 319:
    
 ; 64 Bit OS  ; 64 Bit OS 
-if GetSystemType =  "64 Bit System" +if GetSystemType =      "64 Bit System" 
- comment " 64 Bit System" +        comment " 64 Bit System" 
- comment $ProductID$ wird entfernt." +        comment $ProductId+ " wird entfernt." 
- Sub_uninstall+        Sub_uninstall
 endif endif
    
 ; 32 Bit OS  ; 32 Bit OS 
 if GetSystemType =  "x86 System" if GetSystemType =  "x86 System"
- comment " 32 Bit System" +        comment " 32 Bit System" 
- comment $ProductID$ wird entfernt" +        comment $ProductId+ " wird entfernt" 
- Sub_uninstall+        Sub_uninstall
 endif endif
    
    
 [Winbatch_remove] [Winbatch_remove]
-"%ProfileDir%\polizei\$UninstPrg$" $Parameter$+"$UninstPrg$" $Parameter$
    
    
Line 310: Line 350:
 ; http://msdn.microsoft.com/en-us/library/aa368542.aspx ; http://msdn.microsoft.com/en-us/library/aa368542.aspx
 if ($ExitCode$ = "0") if ($ExitCode$ = "0")
- comment "Looks good: setup program gives exitcode zero"+        comment "Looks good: setup program gives exitcode zero"
 else else
- comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ +        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ 
- if ($ExitCode$ = "1605"+        if ($ExitCode$ = "1605"
- comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." +                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" +                comment "Uninstall of a not installed product failed - no problem" 
- else +        else 
- if ($ExitCode$ = "1641"+                if ($ExitCode$ = "1641"
- comment "looks good: setup program gives 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." +                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success." 
- else +                else 
- if ($ExitCode$ = "3010"+                        if ($ExitCode$ = "3010"
- comment "looks good: setup program gives 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." +                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success." 
- else +                        else 
- logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ +                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ 
- isFatalError +                                isFatalError 
- endif +                        endif 
- endif +                endif 
- endif+        endif
 endif endif
 </code> </code>
userspace/wps-office.1557921444.txt.gz · Last modified: 2021/08/23 08:37 (external edit)