1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
#include <GUIConstants.au3>
Break(1)
;###################################################################
;Détection de l'utilisation d'Office et fermeture si nécessaire :
;Copie du logo
FileInstall("Office.jpg", "D:\Office.jpg", 1)
;Variables processus
$word = ProcessExists("winword.exe")
$excel = ProcessExists("excel.exe")
$powerpoint = ProcessExists("powerpnt.exe")
$access = ProcessExists("msaccess.exe")
;$outlook = ProcessExists("outlook.exe")
$publisher = ProcessExists("mspub.exe")
$query = ProcessExists("vista.exe")
If $excel or $word or $powerpoint or $access Or $publisher Or $query Then
$m1 = "------ Service Informatique ------"
$m2 = "Une mise à jour ""OFFICE 2003"" et ""ESSBASE"" est nécessaire."
$m3 = "Si vous êtes en train de travailler sur :"
$m4 = "Word, Excel, PowerPoint, Access, Publisher,Query ou Essbase,"
$m5 = "Merci de fermer ces applications."
$m6 = "Dans le cas contraire et à la fin du temps imparti,"
$m7 = "ces applications seront automatiquement fermées"
$m8 = "Temps imparti"
GUICreate("Office update", 350, 300, -1, -1, $WS_POPUPWINDOW)
GUICtrlCreatePic("D:\Office.jpg", 155, 5, 40, 40)
$label1 = GUICtrlCreateLabel($m1, 40, 50, 280, 20, $SS_CENTER)
$label2 = GUICtrlCreateLabel($m2, 10, 70, 330, 20, $SS_CENTER)
$label3 = GUICtrlCreateLabel($m3, 10, 100, 330, 20, $SS_CENTER)
$label4 = GUICtrlCreateLabel($m4, 10, 120, 330, 20, $SS_CENTER)
$label5 = GUICtrlCreateLabel($m5, 10, 140, 330, 20, $SS_CENTER)
$label6 = GUICtrlCreateLabel($m6, 10, 170, 330, 20, $SS_CENTER)
$label7 = GUICtrlCreateLabel($m7, 10, 190, 330, 20, $SS_CENTER)
$label8 = GUICtrlCreateLabel($m8, 10, 230, 330, 20, $SS_CENTER)
GUISetState()
$wait = 1500; wait ms for next progressstep
$s = 0; progressbar-saveposition
$Progressbar = GUICtrlCreateProgress(20, 250, 305, 20)
GUICtrlSetColor($Progressbar,0x00CC00)
$msg = GUIGetMsg()
For $i = $s To 100
;If $excel = 0 then ExitLoop
If ProcessExists($excel) = 0 and ProcessExists($word) = 0 And ProcessExists($powerpoint) = 0 And ProcessExists($access) = 0 And ProcessExists($query) = 0 And ProcessExists($publisher) = 0 then ExitLoop
If GUICtrlRead($Progressbar) = 85 Then
GUICtrlSetColor($Progressbar,0xff0000)
;TrayTip("Office update", "15 secondes avant la fermeture de la suite Office", 10, 1)
EndIf
$s = $i
$s=0
GUICtrlSetData ($Progressbar,$i)
Sleep($wait)
Next
;loop pour le process en multiples utilisations
Do
ProcessClose($word)
ProcessClose($excel)
ProcessClose($powerpoint)
ProcessClose($access)
ProcessClose($query)
ProcessClose($publisher)
Until Not ProcessExists($word)
ProcessExists($excel)
ProcessExists($powerpoint)
ProcessExists($access)
ProcessExists($query)
ProcessExists($publisher)
EndIf
;Opt("TrayIconHide", 1)
FileDelete("D:\Office.jpg")
GUIDelete()
;###################################################################
;Transfert des Macros 9.0 vers 11.0
$Open = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN')
$Open1 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN1')
$Open2 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN2')
$Open3 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN3')
$Open4 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN4')
$Open5 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN5')
$Open6 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN6')
$Open7 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN7')
$Open8 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN8')
$Open9 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN9')
$Open10 = RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN10')
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN', 'REG_SZ', "" & $Open)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN1') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN1', 'REG_SZ', "" & $Open1)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN1')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN2') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN2', 'REG_SZ', "" & $Open2)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN2')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN3') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN3', 'REG_SZ', "" & $Open3)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN3')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN4') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN4', 'REG_SZ', "" & $Open4)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN4')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN5') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN5', 'REG_SZ', "" & $Open5)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN5')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN6') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN6', 'REG_SZ', "" & $Open6)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN6')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN7') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN7', 'REG_SZ', "" & $Open7)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN7')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN8') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN8', 'REG_SZ', "" & $Open8)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN8')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN9') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN9', 'REG_SZ', "" & $Open9)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN9')
EndIf
If RegRead('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN10') Then
RegWrite('HKCU\Software\Microsoft\Office\11.0\Excel\Options', 'OPEN10', 'REG_SZ', "" & $Open10)
RegDelete('HKCU\Software\Microsoft\Office\9.0\Excel\Options', 'OPEN10')
EndIf
;Package 2
;###################################################################
;Début du splash qui indique la MAJ
$m1 = "La mise à jour Office 2003 est en cours." & @LF & "Merci de ne pas éteindre l'ordinateur" & @LF & "et de ne pas utiliser Office"
SplashTextOn("", $m1, 130, 70, -1, -1, 16, "", 8, 400)
;###################################################################
;Désinstallation de Showcase Strategy 4 si présent:
;Version Installshield
If RegRead('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ShowCase STRATEGY 4.0', 'UninstallString') Then
RegWrite('HKLM\SOFTWARE', '@@PresEss6', 'REG_SZ', 'PresEss6')
RunWait("C:\WINDOWS\IsUninst.exe -a -f""C:\Program Files\ShowCase STRATEGY\DeIsL1.isu"" -c""C:\Program Files\ShowCase STRATEGY\_UNINST.DLL""")
DirRemove("C:\Program Files\ShowCase STRATEGY", 1)
EndIf
;Version MsiExec
If RegRead('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{17369AA0-2DBB-49E8-B64B-2E65975084CC}', 'UninstallString') Then
RegWrite('HKLM\SOFTWARE', '@@PresEss6', 'REG_SZ', 'PresEss6')
RunWait("net stop BITS", @WindowsDir, @SW_HIDE)
RunWait("MsiExec.exe /X{17369AA0-2DBB-49E8-B64B-2E65975084CC} /QUIET")
RunWait("net start BITS", @WindowsDir, @SW_HIDE)
DirRemove("C:\Program Files\ShowCase STRATEGY", 1)
EndIf
;###################################################################
;Installation du pack MSO2003 STD US
RunWait("STD_US\setupstd.exe TRANSFORMS=""STD11.MST"" /q /noreboot")
;###################################################################
;Installation du pack MSO2003 MUI FR
RunWait("MUI_FR\setup.exe TRANSFORMS=""RCSMUI_FR.MST"" /q /noreboot")
;###################################################################
;Installation du patch Office2003SP3-KB923618-FullFile-FRA.exe
RunWait("Office2003SP3-KB923618-FullFile-ENU.exe /Q","", @SW_HIDE)
;###################################################################
;Installation de Essbase 6.57 si nécessaire:
If RegRead('HKLM\SOFTWARE', '@@PresEss6') Then
RunWait("Essbase_657\install_657.exe")
Sleep(20000)
EndIf
;###################################################################
;Ajout de l'association de fichier sur .dbq
If RegRead('HKLM\SOFTWARE', '@@PresEss6') Then
RegWrite('HKCR\.dbq', '', 'REG_SZ', 'ShowCase.Query.30')
RegDelete('HKLM\SOFTWARE', '@@PresEss6')
EndIf
;###################################################################
;Fin du splash qui indique la MAJ
SplashOff()
;Package 3
;###################################################################
;Suppression de la Macro Essabse 6.00.0 ou SHC Strategy 4 sur 11.0 si présentes
$reg11_data = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN")
$reg11_data1 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN1")
$reg11_data2 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN2")
$reg11_data3 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN3")
$reg11_data4 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN4")
$reg11_data5 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN5")
$reg11_data6 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN6")
$reg11_data7 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN7")
$reg11_data8 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN8")
$reg11_data9 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN9")
$reg11_data10 = RegRead("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN10")
$essmacro11 = '/R "C:\Program Files\ShowCase STRATEGY\bin\ESSEXCLN.XLL"'
$shcmacro11 = '/R "C:\Program Files\ShowCase STRATEGY\Bin\scxadd32.xll"'
If $reg11_data = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN")
ElseIf $reg11_data1 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN1")
ElseIf $reg11_data2 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN2")
ElseIf $reg11_data3 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN3")
ElseIf $reg11_data4 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN4")
ElseIf $reg11_data5 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN5")
ElseIf $reg11_data6 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN6")
ElseIf $reg11_data7 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN7")
ElseIf $reg11_data8 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN8")
ElseIf $reg11_data9 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN9")
ElseIf $reg11_data10 = $essmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN10")
EndIf
If $reg11_data = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN")
ElseIf $reg11_data1 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN1")
ElseIf $reg11_data2 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN2")
ElseIf $reg11_data3 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN3")
ElseIf $reg11_data4 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN4")
ElseIf $reg11_data5 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN5")
ElseIf $reg11_data6 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN6")
ElseIf $reg11_data7 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN7")
ElseIf $reg11_data8 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN8")
ElseIf $reg11_data9 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN9")
ElseIf $reg11_data10 = $shcmacro11 Then
RegDelete("HKCU\Software\Microsoft\Office\11.0\Excel\Options", "OPEN10")
EndIf
;###################################################################
;Splash de fin
If ProcessExists("winlogon.exe") Then
$m1 = " LA MISE A JOUR OFFICE 2003 EST TERMINEE"
$m2 = " Afin de finaliser cette opération,"
$m3 = " merci d'enregister l'ensemble de vos données"
$m4 = "et de redémarrer ""IMMEDIATEMENT"" votre ordinateur"
$m5 = " En cas de problèmes,"
$m6 = " vous pouvez contacter la hotline au"
$m7 = " 0101010101 ou hotline@toto.com"
$m8 = " Merci pour votre participation et votre patience"
MsgBox(0, "Fin d'installation Office 2003", $m1 & @LF & @LF & @LF & $m2 & @LF & $m3 & @LF & $m4 & @LF & @LF & @LF & $m5 & @LF & $m6 & @LF & $m7 & @LF & @LF & $m8, 3600)
EndIf |
Partager