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:adobe_reader_9.x [2013/02/28 14:11]
phimeca
userspace:adobe_reader_9.x [2013/05/16 17:31]
phimeca forgot uninstall section
Line 1: Line 1:
 ====== Adobe Reader 9.5.x ====== ====== Adobe Reader 9.5.x ======
-Script by phimeca ​\\+Script by phimeca ​.
  
-Tested with opsi 4.0.2 \\ +Tested with opsi 4.0.2 
-Tested with Windows XP Professional and Windows 7 Enterprise x64 \\+Tested with Windows XP Professional and Windows 7 Enterprise x64 
  
-Installation Script for Adobe Reader 9.5 with patchs ​and uninstalling ​version 10.0\\ +Installation Script for Adobe Reader 9.5 with patchs ​until 9.5.5. \\ 
-Uninstallation Script for Adobe Reader Versions 9.5.0 - 9.5.4 \\+Be careful, it also uninstall ​version 10.0 .\\ 
 +Remove adobe desktop shortcut.\\ 
 +Disable update notification to users.\\ 
 +msi files can be downloaded from: ftp://​ftp.adobe.com/​pub/​adobe/​reader/​win/​9.x/ ​
  
 +Uninstallation Script for Adobe Reader Versions 9.5.x 
  
-The installation files can be downloaded from: ftp://​ftp.adobe.com/​pub/​adobe/​reader/​win/​9.x/​ \\ 
  
 ==== setup.ins ==== ==== setup.ins ====
Line 17: Line 20:
 DefVar $ProductId$ DefVar $ProductId$
 DefVar $MinimumSpace$ DefVar $MinimumSpace$
-DefVar $MsiFile$ 
 DefVar $LogDir$ DefVar $LogDir$
-DefVar $InstallDir$+DefVar $ExePath$
 DefVar $DisplayVersion$ DefVar $DisplayVersion$
 +DefVar $ExitCode$
  
 Set $LogDir$ = "​%SystemDrive%\tmp"​ Set $LogDir$ = "​%SystemDrive%\tmp"​
 Set $ProductId$ = "​AdobeReader"​ Set $ProductId$ = "​AdobeReader"​
 Set $MinimumSpace$ = "150 MB" Set $MinimumSpace$ = "150 MB"
-Set $MsiFile$ = "​%ScriptPath%\AdbeRdr950_fr_FR.msi"​ +Set $ExePath$ = "​%ProgramFilesDir%\Adobe\Reader 9.0\Reader\AcroRd32.exe"​
-Set $InstallDir$ = "​%ProgramFilesDir%\Adobe\Reader 9.0\Reader\AcroRd32.exe"​ +
- +
-; Retrieve version already install +
-Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)+
  
 +ShowBitmap "​%ScriptPath%\" ​ + $ProductId$ + "​.png"​
  
 if not(HasMinimumSpace ("​%SystemDrive%",​ $MinimumSpace$)) if not(HasMinimumSpace ("​%SystemDrive%",​ $MinimumSpace$))
Line 36: Line 36:
   isFatalError   isFatalError
 else else
-  ShowBitmap "​%ScriptPath%\" ​ + $ProductId$ + "​.png"​ 
   Message "​Installing " + $ProductId$ + ". It can takes several minutes, please be patient..."​   Message "​Installing " + $ProductId$ + ". It can takes several minutes, please be patient..."​
 endif endif
  
  
-; remove version ​10.0+; remove ​old version ​in order to apply new TRANSFORM file (remove it for the next version)
 if FileExists("​%ProgramFilesDir%\Adobe\Reader 10.0\Reader\AcroRd32.exe"​) if FileExists("​%ProgramFilesDir%\Adobe\Reader 10.0\Reader\AcroRd32.exe"​)
   Message "​Uninstalling " + $ProductId$ + " ..."   Message "​Uninstalling " + $ProductId$ + " ..."
Line 47: Line 46:
 endif endif
  
-; install adobe 9.5.0 + 
-if not(FileExists(""​+$InstallDir$+""​))+if not(FileExists(""​+$ExePath$+""​))
   Winbatch_install   Winbatch_install
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
  
 Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​) Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)
Line 57: Line 57:
 if ($DisplayVersion$ = "​9.5.0"​) if ($DisplayVersion$ = "​9.5.0"​)
   Winbatch_patch_install_951   Winbatch_patch_install_951
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
  
 Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​) Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)
Line 64: Line 65:
 if ($DisplayVersion$ = "​9.5.1"​) if ($DisplayVersion$ = "​9.5.1"​)
   Winbatch_patch_install_952   Winbatch_patch_install_952
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
  
 Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​) Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)
Line 71: Line 73:
 if ($DisplayVersion$ = "​9.5.2"​) if ($DisplayVersion$ = "​9.5.2"​)
   Winbatch_patch_install_953   Winbatch_patch_install_953
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
  
 Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​) Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)
Line 78: Line 81:
 if ($DisplayVersion$ = "​9.5.3"​) if ($DisplayVersion$ = "​9.5.3"​)
   Winbatch_patch_install_954   Winbatch_patch_install_954
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
 +
 +Set $DisplayVersion$ = GetRegistrystringvalue32("​[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1036-7B44-A95000000001}] DisplayVersion"​)
 +
 +if ($DisplayVersion$ = "​9.5.4"​)
 +  Winbatch_patch_install_955
 +  Sub "​%ScriptPath%\check_msi_exit_code.ins"​
 +endif
 +
  
 Files_remove_shortcut Files_remove_shortcut
 +Winbatch_disable_updater
  
-if not(FileExists(""​+$InstallDir$+""​)) +if not(FileExists(""​+$ExePath$+""​)) 
-  Message "​Error:​ file " + $InstallDir$ + " not found after installing " + $ProductId$ + "​!"​+  Message "​Error:​ file " + $ExePath$ + " not found after installing " + $ProductId$ + "​!"​
   isFatalError   isFatalError
 endif endif
 +
 +
  
  
 [Winbatch_install] [Winbatch_install]
-msiexec /i "$MsiFile$" /l* "​$LogDir$\$ProductId$.install_log.txt"​ /qn ALLUSERS=2 REBOOT=ReallySuppress EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES +msiexec /i "%ScriptPath%\AdbeRdr950_fr_FR.msi" /l* "​$LogDir$\$ProductId$.install_log.txt"​ /qn ALLUSERS=2 REBOOT=ReallySuppress EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES 
-; delete tasks update + 
-chtasks ​/delete /TN "Adobe Flash Player Updater"​ /F+ 
 +[Winbatch_disable_updater] 
 +schtasks ​/delete /TN "Adobe Flash Player Updater"​ /F
  
  
Line 98: Line 115:
 delete "​%CommonDesktopDir%\Adobe Reader 9.lnk" delete "​%CommonDesktopDir%\Adobe Reader 9.lnk"
  
-; install patch+
 [Winbatch_patch_install_951] [Winbatch_patch_install_951]
 msiexec /p "​%ScriptPath%\AdbeRdrUpd951_all_incr.msp"​ /qn msiexec /p "​%ScriptPath%\AdbeRdrUpd951_all_incr.msp"​ /qn
Line 110: Line 127:
 [Winbatch_patch_install_954] [Winbatch_patch_install_954]
 msiexec /p "​%ScriptPath%\AdbeRdrUpd954_all_incr.msp"​ /qn msiexec /p "​%ScriptPath%\AdbeRdrUpd954_all_incr.msp"​ /qn
 +
 +[Winbatch_patch_install_955]
 +msiexec /p "​%ScriptPath%\AdbeRdrUpd955_all_incr.msp"​ /qn
  
  
Line 116: Line 136:
 msiexec /qn /​x{AC76BA86-7AD7-1036-7B44-AA1000000001} msiexec /qn /​x{AC76BA86-7AD7-1036-7B44-AA1000000001}
 </​code>​ </​code>​
 +
  
  
Line 121: Line 142:
 <code winst> <code winst>
 [Actions] [Actions]
-DefVar $MsiFile$ +DefVar $ExePath$
-DefVar $InstallDir$+
 DefVar $ProductId$ DefVar $ProductId$
  
 Set $ProductId$ = "​AdobeReader"​ Set $ProductId$ = "​AdobeReader"​
-Set $MsiFile$ = "​%ScriptPath%\AdbeRdr950_fr_FR.msi"​ +Set $ExePath$ = "​%ProgramFilesDir%\Adobe\Reader 9.0\Reader\AcroRd32.exe"​
-Set $InstallDir$ = "​%ProgramFilesDir%\Adobe\Reader 9.0\Reader\AcroRd32.exe"​+
  
 ShowBitmap "​%ScriptPath%\"​ + $ProductId$ + "​.png"​ ShowBitmap "​%ScriptPath%\"​ + $ProductId$ + "​.png"​
 KillTask "​AcroRd32.exe"​ KillTask "​AcroRd32.exe"​
  
-if FileExists(""​+$InstallDir$+""​)+if FileExists(""​+$ExePath$+""​)
   Message "​Uninstalling " + $ProductId$ + " ..."   Message "​Uninstalling " + $ProductId$ + " ..."
   Winbatch_uninstall_v950   Winbatch_uninstall_v950
-  Sub "​%ScriptPath%\check_exit_code.ins"+  Sub "​%ScriptPath%\check_msi_exit_code.ins"
 endif endif
 +
  
  
 [Winbatch_uninstall_v950] [Winbatch_uninstall_v950]
-msiexec /x "$MsiFile$" REBOOT=ReallySuppress /qn+ 
 +;msiexec /qn /​x{AC76BA86-7AD7-1033-7B44-A94000000001} 
 +;msiexec /qn /​x{AC76BA86-7AD7-1036-7B44-A95000000001} 
 +msiexec /x "%ScriptPath%\AdbeRdr950_fr_FR.msi" REBOOT=ReallySuppress /qn
 </​code>​ </​code>​
  
  
-==== check_exit_code.ins ==== +==== check_msi_exit_code.ins ==== 
-<code winst> +same as [[userspace:​check_msi-exitcode|check_msi-exitcode]]
-; $ProductId$ must be defined and set +
  
-comment "Test for installation success via exit code." 
-if (getLastExitCode = "​0"​) 
-    comment "Looks good: " + $ProductId$ + " program gives exitcode zero" 
-else 
-    LogError $ProductId$ + " program gives a exitcode unequal zero: " + getLastExitCode 
-    comment "​program gives an exitcode unequal to zero: " + getLastExitCode 
-    isFatalError 
-endif 
-</​code>​ 

QR Code
QR Code userspace:adobe_reader_9.x (generated for current page)