vous l’avez vu ? un fichier CAB est dispo pour intégrer les patches Citrix dans SUS…
http://support.citrix.com/article/CTX110052
Haaa tu m’as eu, c’est pas wsus mais sms >:(
Si seulement Citrix avait un fichier XML, comme shavlik et mbsa… avec la liste des HF :’(
"chavers" wrote:
Si seulement Citrix avait un fichier XML, comme shavlik et mbsa.... avec la liste des HF :'(
Oui, parce qu'attaquer la page "à la pioche", c'est pas clean
On error resume Next
' Constantes
CONST CPS40_W2K3 = "productVersion=Citrix+Presentation+Server+4.0+for+Microsoft+Windows+2003&"
CONST CPS40_W2K0 = "productVersion=Citrix+Presentation+Server+4.0+for+Microsoft+Windows+2000&"
CONST FR = "languages=French"
CONST US = "languages=English"
CONST ES = "languages=Spanish"
CONST GE = "languages=German"
CONST JP = "languages=Japanese"
CONST StrHtmlSourceURL = "http://support.citrix.com/hotfixes.jspa?subCategoryID=620&onlyCritical=false&spLevels=&"
' fonctions
Function GetPath() 'Fonction du répertoire courant
Dim path
path = WScript.ScriptFullName
GetPath = Left(path, InStrRev(path, ""))
End Function
'Récupération nom machine
Set objNet = CreateObject("WScript.NetWork")
StrServerName = objNet.ComputerName
' Récupération OS & Langue
Set objWMIService = GetObject("winmgmts:" & StrServerName &"rootcimv2")
Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
StrServerOS = objOperatingSystem.Caption
StrServerLanguage = objOperatingSystem.Locale
StrProductVersion = ""
Strlanguage = ""
if inStr(StrServerOS,"Microsoft(R) Windows(R) Server 2003") then StrProductVersion = CPS40_W2K3
if inStr(StrServerOS,"Microsoft Windows 2000 Server") then StrProductVersion = CPS40_W2K0
If StrProductVersion = "" then
msgbox "Système d'exploitation " & StrServerOS & " non supporté"
wscript.quit
End if
If StrServerLanguage = "0407" Then Strlanguage = GE
If StrServerLanguage = "0409" Then Strlanguage = US
If StrServerLanguage = "040a" Then Strlanguage = ES
If StrServerLanguage = "040c" Then Strlanguage = FR
if StrServerLanguage = "0411" Then Strlanguage = JP
if Strlanguage = "" then
msgbox "Langue non supportée"
wscript.quit
End if
Next
' Récupération de la liste des hotfixs installés
Set dinstalledHF = CreateObject("Scripting.dictionary") 'création d'un dictionnaire pour faciliter la recherche
Set FarmObject = CreateObject("MetaFrameCOM.MetaFrameFarm")
FarmObject.Initialize 1
For Each anServer In FarmObject.Servers
Set theWinServer = anServer.WinServerObject2
If anServer.ServerName = StrServerName then
nHotfixes = theWinServer.HotfixCount
aHotfixes = theWinServer.Hotfixes
For iCount = 0 To (nHotfixes - 1)
Set aHotfix = aHotfixes(iCount)
Set Datein = aHotfix.InstalledOn
dinstalledHF.add trim(aHotfix.Name) , Datein.Day & "/" & Datein.Month & "/" & Datein.Year
Next
End if
Next
'Récupération des Hotfixs disponibles
With CreateObject("MSXML2.XMLHTTP")
.open "GET", StrHtmlSourceURL & StrProductVersion & Strlanguage, False
.send
StrHtmlSource = .responseText
End With
if StrHtmlSource = "" then
msgbox "Impossible de récupérer la liste des correctifs"
wscript.quit
End if
aHtmlSource = Split(StrHtmlSource,VBCRLF)
Set dAvailableHF = CreateObject("Scripting.dictionary")
For i=Lbound(aHtmlSource) to Ubound(aHtmlSource)
StrHFName = ""
if instr(aHtmlSource(i),"hot_fix_rollup-16x16.gif") then
StrHFName = mid(trim(aHtmlSource(i+3)),62,13)
StrHFArticle = mid(trim(aHtmlSource(i+3)),32,9)
StrType = "HFRP"
End If
if instr(aHtmlSource(i),"hot_fix-16x16.gif") then
if instr(trim(aHtmlSource(i+3)),"ASC") then
StrHFName = mid(trim(aHtmlSource(i+3)),43,10)
StrHFArticle = mid(trim(aHtmlSource(i+3)),32,9)
StrType = "HFIX"
Else
StrHFName = mid(trim(aHtmlSource(i+3)),50,instr(aHtmlSource(i+3),"-")-50)
StrHFArticle = mid(trim(aHtmlSource(i+3)),32,9)
StrType = "HFIX"
End if
End if
' le correctif est il installé.
if StrHFName <> "" Then
if dinstalledHF.Exists(trim(StrHFName)) then
StrStatus = " Installé le " & dinstalledHF(trim(StrHFName))
Else
StrStatus = " Non Installé"
End if
dAvailableHF.Add StrHFName & "|" & StrHFArticle , StrStatus
End if
Next
'Ecriture dans le fichiers HTML
Set objFSOHTMLtemp = CreateObject("Scripting.FileSystemObject") 'Fichier temp contenant la page HTML
Set objHTMLTempFile = objFSOHTMLtemp.CreateTextFile( GetPath() & "Citrix Hotfixs.htm" , True)
' Barre de Titre de la fenêtre
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine " Hotfixs Citrix "
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine " "
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine " Correctif "
objHTMLTempFile.WriteLine " Article KB Citrix "
objHTMLTempFile.WriteLine " Status "
objHTMLTempFile.WriteLine " "
index =0
for Each objAv In dAvailableHF
aTemp = split(objAv,"|")
objHTMLTempFile.WriteLine ""
objHTMLTempFile.Writeline " " & aTemp(0) & " " &_
" " & aTemp(1) & " " &_
" " & dAvailableHF(objAv) & " "
index = index + 1
objHTMLTempFile.WriteLine " "
Next
objHTMLTempFile.WriteLine "
"
objHTMLTempFile.WriteLine ""
objHTMLTempFile.WriteLine ""
Set shell = WScript.CreateObject("WScript.Shell")
Set oIE = WScript.CreateObject("InternetExplorer.Application")
oIE.Left = 50
oIE.Top = 100
oIE.Height = 65 + index * 16
oIE.Width = 400
oIE.MenuBar = 0
oIE.ToolBar = 0
oIE.StatusBar = 0
oIE.navigate GetPath() & "Citrix Hotfixs.htm"
oIE.Visible = 1
shell.AppActivate "Citrix Hotfixs"
Wscript.quit
"chavers" wrote:
Haaa tu m'as eu, c'est pas wsus mais sms >:(
Sus install des soft et des patchs et tout ce que tu veux, Wsus est FREE mais n’installe QUE des patch
"Laurent FALGUIERE" wrote:
Oui, parce qu'attaquer la page "à la pioche", c'est pas clean
Il fonctionne surper ce script. ca me donne envie de faire un flux rrs sur mon site :-*
"chavers" wrote:
"Laurent FALGUIERE" wrote:
Oui, parce qu'attaquer la page "à la pioche", c'est pas clean
Il fonctionnera tant que Citrix ne modifiera pas (trop) la structure de la page... Pour le flux RSS, c'est pas con ! :)