Condividi:        

Errore VBScript

Risolvi qui i tuoi problemi legati a Windows '95, '98, ME, NT, 2000, XP, 2003, Vista...

Moderatori: m.paolo, antoo69, -> EleKtrA <-

Errore VBScript

Postdi duomatic » 17/12/11 08:59

Salve a tutti oggi volevo utilizzare lo script per vedere se flash player è aggiornato ma mi restituisce un errore: Errore di run-time di Microsoft VBScript codice 800A000D, il testo dello script è questo:

messaggio=""
const HKEY_LOCAL_MACHINE = &H80000002
strComputer="."

Function leggiregistro (strKeyPath,strValueName)
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, sValue
Set objReg=Nothing
leggiregistro=sValue
End Function

Function leggipagina (url)
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, 0
xmlhttp.send ""
p=xmlhttp.responseText
Set xmlhttp=Nothing
leggipagina=p
End Function

chiave="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
valore="DisplayVersion"

registry_keys=array(chiave+"Adobe Flash Player Activex",chiave+"Adobe Flash Player Plugin",chiave+"Pidgin",chiave+"FileZilla Client",chiave+"{AC76BA86-7AD7-1040-7B44-A94000000001}")
urls=array("http://www.adobe.com/it/software/flash/about/","http://www.adobe.com/it/software/flash/about/","http://pidgin.im","http://filezilla-project.org/download.php?type=client","http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows")
pagina_intera=array(false,false,true,true,false)
sinizio=array("Internet Explorer (e altri browser che supportano i controlli e i plug-in di Internet Explorer ActiveX)</td>","Firefox, Mozilla, Netscape, Opera (e altri browser basati su plug-in)</td>","","","<th colspan=""3"" class=""data-sectionHead"">Version 9.")
sfine=array("</tr>","</tr>","","","</th>")
alerts=array("Flash Player per Internet Explorer non è aggiornato. ","Flash Player per Mozilla Firefox, Opera ed altri browser non è aggiornato. ","Pidgin non è aggiornato. ","FileZilla Client non è aggiornato. ","Adobe Reader non è aggiornato. ")
testa_versione=array("","","","","9.")

lungh_array=ubound(registry_keys)

For i=0 to lungh_array
versione=leggiregistro(registry_keys(i),valore)
if versione then
htmlpage=leggipagina(urls(i))

if pagina_intera(i)=false then
inizio=instr(htmlpage,sinizio(i))+len(sinizio(i))
stringa=instr(inizio,htmlpage,sfine(i))

update=replace(mid(htmlpage,inizio,stringa-inizio),vbcrlf,"")
update=replace(update,"<td>","")
update=replace(update,"</td>","")
update=testa_versione(i)+trim(update)

if instr(update,versione)=0 then messaggio=messaggio+"- "+ alerts(i) +"Versione più recente: "+update+vbcrlf
else
update=htmlpage
if instr(update,versione)=0 then messaggio=messaggio+"- "+ alerts(i) + vbcrlf
end if

end if
Next

if messaggio="" then
WScript.Echo "Tutti i software controllati risultano aggiornati all'ultima versione"
else
WScript.Echo messaggio
end if

Potete aiutarmi? Sistema operativo Windows 7 Home Premium
duomatic
Utente Senior
 
Post: 116
Iscritto il: 06/10/04 14:01
Località: Milano

Sponsor
 

Torna a Sistemi Operativi Windows


Topic correlati a "Errore VBScript":


Chi c’è in linea

Visitano il forum: Nessuno e 72 ospiti