Etat du script: Fonctionnel
Présentation:
Le script:
'Inventaire des versions de Microsoft Office 'Version 0.4 20090612 by Clockover 'Variables de configuration strPath = "c:\" ou "\\srv.domaine.local\partage" 'Chemin d'enregistrement du résultat 'Script On Error Resume Next 'Noter le nom du poste Set WshNetwork = WScript.CreateObject("WScript.Network") strComputer = WshNetwork.ComputerName 'Ouverture d'un fichier de résultat Const ForWriting = 2 Dim fso, file Set fso = CreateObject("Scripting.FileSystemObject") Set file = fso.OpenTextFile(strPath & strComputer & ".txt", ForWriting,true) 'Chemin et nom du fichier file.write(date) 'Inscrire la date de la dernière MAJ 'Détection des logiciels Office Set WS = CreateObject("WScript.Shell") val = WS.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Office\") If (Err.number = 0) Then 'msgbox "Debug: Office présent" Err.number = 0 'Pour MS Office 2007: val = WS.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0\Registration\") If (Err.number = 0) Then 'msgbox "Debug: Office 2007" GUID = Enumerate("SOFTWARE\Microsoft\Office\12.0\Registration",0) check GUID, 2007 End if Err.number = 0 'Pour MS Office 2003: val = WS.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Registration\") If (Err.number = 0) Then 'msgbox "Debug: Office 2003" GUID = Enumerate("SOFTWARE\Microsoft\Office\11.0\Registration",0) check GUID, 2003 End if Err.number = 0 'Pour MS Office 2002/XP: val = WS.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Office\10.0\Registration\") If (Err.number = 0) Then 'msgbox "Debug: Office XP" GUID = Enumerate("SOFTWARE\Microsoft\Office\10.0\Registration",0) check GUID, 2002 End if Err.number = 0 'Pour MS Office 2000: val = WS.RegRead("HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Registration\") If (Err.number = 0) Then 'msgbox "Debug: Office 2000" GUID = Enumerate("SOFTWARE\Microsoft\Office\9.0\Registration",0) check GUID, 2000 End if Else 'msgbox "Debug: Pas d'office" End If Function Enumerate(strKey,numLevel) Const HKEY_LOCAL_MACHINE = &H80000002 Set refRegistry = getobject("winmgmts:root\default:stdregprov") If refRegistry.EnumKey(HKEY_LOCAL_MACHINE, strKey, arrSubKeys) = 0 Then For Each strSubKey In arrSubKeys Enumerate = strSubKey 'Enumerate strKey & "\" & strSubKey, refRegistry, numLevel + 1 Next Else 'WScript.Echo "Debug: Unable to enumerate. Sorry." WScript.Quit End If End Function sub check(GUID,version) file.write(vbCr) if (version = 2007) then 'See http://support.microsoft.com/kb/928516 titre_version = Mid(GUID, 11, 4) 'Récupération du nom exact du produit if (titre_version = "0011") then file.write("Microsoft Office Professionnel Plus 2007" & ",") elseif (titre_version = "0012") then file.write("Microsoft Office Standard 2007" & ",") elseif (titre_version = "0013") then file.write("Microsoft Office Basic 2007" & ",") elseif (titre_version = "0014") then file.write("Microsoft Office Professionnel 2007" & ",") elseif (titre_version = "0015") then file.write("Microsoft Office Access 2007" & ",") elseif (titre_version = "0016") then file.write("Microsoft Office Excel 2007" & ",") elseif (titre_version = "0017") then file.write("Microsoft Office SharePoint Designer 2007" & ",") elseif (titre_version = "0018") then file.write("Microsoft Office PowerPoint 2007" & ",") elseif (titre_version = "0019") then file.write("Microsoft Office Publisher 2007" & ",") elseif (titre_version = "001A") then file.write("Microsoft Office Outlook 2007" & ",") elseif (titre_version = "001B") then file.write("Microsoft Office Word 2007" & ",") elseif (titre_version = "001C") then file.write("Microsoft Office Access Runtime 2007" & ",") elseif (titre_version = "0020") then file.write("Pack de compatibilité pour formats de fichier Microsoft Office pour Word, Excel et PowerPoint 2007" & ",") elseif (titre_version = "0029") then file.write("Microsoft Office Excel 2007" & ",") elseif (titre_version = "002B") then file.write("Microsoft Office Word 2007" & ",") elseif (titre_version = "002E") then file.write("Microsoft Office Ultimate 2007" & ",") elseif (titre_version = "002F") then file.write("Microsoft Office Edition Familial et Etudiants 2007" & ",") elseif (titre_version = "0030") then file.write("Microsoft Office Edition Enterprise 2007" & ",") elseif (titre_version = "0037") then file.write("Microsoft Office PowerPoint 2007" & ",") elseif (titre_version = "003A") then file.write("Microsoft Office Project Standard 2007" & ",") elseif (titre_version = "003B") then file.write("Microsoft Office Project Professionnel 2007" & ",") elseif (titre_version = "0044") then file.write("Microsoft Office InfoPath 2007" & ",") elseif (titre_version = "0051") then file.write("Microsoft Office Visio Professionnel 2007" & ",") elseif (titre_version = "0052") then file.write("Microsoft Office Visio Viewer 2007" & ",") elseif (titre_version = "0053") then file.write("Microsoft Office Visio Standard 2007" & ",") elseif (titre_version = "00A1") then file.write("Microsoft Office OneNote 2007" & ",") elseif (titre_version = "00A3") then file.write("Microsoft Office OneNote Famille & Etudiant 2007" & ",") elseif (titre_version = "00A7") then file.write("Assistant Impression de calendriers pour Microsoft Office Outlook 2007" & ",") elseif (titre_version = "00A9") then file.write("Microsoft Office InterConnect 2007" & ",") elseif (titre_version = "00AF") then file.write("Visionneuse Microsoft Office PowerPoint 2007 (Anglais)" & ",") elseif (titre_version = "00B0") then file.write("Macro complémentaire Microsoft Enregistrer en tant que PDF" & ",") elseif (titre_version = "00B1") then file.write("Macro complémentaire Microsoft Enregistrer en tant que XPS" & ",") elseif (titre_version = "00B2") then file.write("Macro complémentaire Microsoft Enregistrer en tant que PDF ou XPS" & ",") elseif (titre_version = "00BA") then file.write("Microsoft Office Groove 2007" & ",") elseif (titre_version = "00CA") then file.write("Microsoft Office Edition PME 2007" & ",") elseif (titre_version = "00E0") then file.write("Microsoft Office Outlook 2007" & ",") elseif (titre_version = "10D7") then file.write("Microsoft Office InfoPath Forms Services" & ",") elseif (titre_version = "110D") then file.write("Microsoft Office SharePoint Server 2007" & ",") else file.write("Microsoft Office 2007 non determiné" & ",") end if release = Mid(GUID, 2, 1) 'Détection release/SP if (release <= "8") then file.write("Alpha/Beta/RC" & ",") elseif (release = "9") then file.write("Finale" & ",") elseif (release = "A") then file.write("SP1" & ",") elseif (release = "B") then file.write("SP2" & ",") elseif (release = "C") then file.write("SP3" & ",") else file.write("version non determinée" & ",") end if licence = Mid(GUID, 3, 1) 'Détection Open/Boite/OEM/Eval if (licence = "0") then file.write("Open") elseif (licence = "1") then file.write("Boite/OEM") elseif (licence = "2") then file.write("Demo") else file.write("Licence inconnue") end if end if if (version = 2003) then 'See http://support.microsoft.com/kb/832672/ titre_version = Mid(GUID, 4, 2) 'Récupération du nom exact du produit if (titre_version = "11") then file.write("Microsoft Office Edition Professionnelle Entreprise 2003" & ",") elseif (titre_version = "12") then file.write("Microsoft Office Edition Standard 2003" & ",") elseif (titre_version = "13") then file.write("Microsoft Office Edition Basique 2003" & ",") elseif (titre_version = "14") then file.write("Windows Windows SharePoint Services 2.0" & ",") elseif (titre_version = "15") then file.write("Microsoft Office Access 2003" & ",") elseif (titre_version = "16") then file.write("Microsoft Office Excel 2003" & ",") elseif (titre_version = "17") then file.write("Microsoft Office FrontPage 2003" & ",") elseif (titre_version = "18") then file.write("Microsoft Office PowerPoint 2003" & ",") elseif (titre_version = "19") then file.write("Microsoft Office Publisher 2003" & ",") elseif (titre_version = "1A") then file.write("Microsoft Office Outlook Professionnel 2003" & ",") elseif (titre_version = "1B") then file.write("Microsoft Office Word 2003" & ",") elseif (titre_version = "1C") then file.write("Microsoft Office Access 2003 Runtime" & ",") elseif (titre_version = "1E") then file.write("Pack d'interface utilisateur Microsoft Office 2003" & ",") elseif (titre_version = "1F") then file.write("Outils de vérification linguistique Microsoft Office 2003" & ",") elseif (titre_version = "23") then file.write("Pack d'interface utilisateur multilingue Microsoft Office 2003" & ",") elseif (titre_version = "24") then file.write("Kit de ressources Microsoft Office 2003" & ",") elseif (titre_version = "26") then file.write("Composants Web Microsoft Office XP" & ",") elseif (titre_version = "2E") then file.write("Microsoft Office 2003 Research Service SDK" & ",") elseif (titre_version = "44") then file.write("Microsoft Office InfoPath 2003" & ",") elseif (titre_version = "83") then file.write("Visionneuse HTML Microsoft Office 2003" & ",") elseif (titre_version = "92") then file.write("Windows SharePoint Services 2.0 Lot de modèles en anglais" & ",") elseif (titre_version = "93") then file.write("Microsoft Office 2003 Web Parts and Components en anglais" & ",") elseif (titre_version = "A1") then file.write("Microsoft Office OneNote 2003" & ",") elseif (titre_version = "A4") then file.write("Composants Web Microsoft Office 2003" & ",") elseif (titre_version = "A5") then file.write("Outil de migration Microsoft SharePoint 2003" & ",") elseif (titre_version = "AA") then file.write("Diffusion de présentation Microsoft Office PowerPoint 2003" & ",") elseif (titre_version = "AB") then file.write("Microsoft Office PowerPoint 2003 Lot de modèles 1" & ",") elseif (titre_version = "AC") then file.write("Microsoft Office PowerPoint 2003 Lot de modèles 2" & ",") elseif (titre_version = "AD") then file.write("Microsoft Office PowerPoint 2003 Lot de modèles 3" & ",") elseif (titre_version = "AE") then file.write("Organigramme hiérarchique Microsoft 2.0" & ",") elseif (titre_version = "CA") then file.write("Microsoft Office Edition PME 2003" & ",") elseif (titre_version = "D0") then file.write("Microsoft Office Access 2003 Developer Extensions" & ",") elseif (titre_version = "DC") then file.write("SDK Microsoft Office 2003 Smart Document" & ",") elseif (titre_version = "E0") then file.write("Microsoft Office Outlook Standard 2003" & ",") elseif (titre_version = "E3") then file.write("Microsoft Office Edition Professionnelle 2003 (avec InfoPath 2003)" & ",") elseif (titre_version = "FD") then file.write("Microsoft Office Outlook 2003 (distribué par MSN)" & ",") elseif (titre_version = "FF") then file.write("Pack linguistique LIP de Microsoft Office 2003" & ",") elseif (titre_version = "F8") then file.write("Outil de suppression des métadonnées" & ",") elseif (titre_version = "3A") then file.write("Microsoft Office Project Standard 2003" & ",") elseif (titre_version = "3B") then file.write("Microsoft Office Project Professionnel 2003" & ",") elseif (titre_version = "32") then file.write("Microsoft Office Project Server 2003" & ",") elseif (titre_version = "51") then file.write("Microsoft Office Visio Professionnel 2003" & ",") elseif (titre_version = "53") then file.write("Microsoft Office Visio Standard 2003" & ",") elseif (titre_version = "5E") then file.write("Pack d'interface utilisateur multilingue Microsoft Office Visio 2003" & ",") else file.write("Microsoft Office 2003 non determiné" & ",") end if release = Mid(GUID, 2, 1) 'Détection release/SP if (release <= "8") then file.write("Alpha/Beta/RC" & ",") elseif (release = "9") then file.write("Finale" & ",") elseif (release = "A") then file.write("SP1" & ",") elseif (release = "B") then file.write("SP2" & ",") elseif (release = "C") then file.write("SP3" & ",") else file.write("version non determinée" & ",") end if licence = Mid(GUID, 3, 1) 'Détection Open/Boite/OEM/Eval if (licence = "0") then file.write("Open") elseif (licence = "1") then file.write("Boite/OEM") elseif (licence = "2") then file.write("Demo") else file.write("Licence inconnue") end if end if if (version = 2002) then 'See http://support.microsoft.com/kb/302663/ titre_version = Mid(GUID, 4, 2) 'Récupération du nom exact du produit if (titre_version = "11") then file.write("Microsoft Office XP Edition Professionnelle" & ",") elseif (titre_version = "12") then file.write("Microsoft Office XP Edition Standard" & ",") elseif (titre_version = "13") then file.write("Microsoft Office XP Edition PME" & ",") elseif (titre_version = "14") then file.write("Serveur Web Microsoft Office XP" & ",") elseif (titre_version = "15") then file.write("Microsoft Access 2002" & ",") elseif (titre_version = "16") then file.write("Microsoft Excel 2002" & ",") elseif (titre_version = "17") then file.write("Microsoft FrontPage 2002" & ",") elseif (titre_version = "18") then file.write("Microsoft PowerPoint 2002" & ",") elseif (titre_version = "19") then file.write("Microsoft Publisher 2002" & ",") elseif (titre_version = "1A") then file.write("Microsoft Outlook 2002" & ",") elseif (titre_version = "1B") then file.write("Microsoft Word 2002" & ",") elseif (titre_version = "1C") then file.write("Microsoft Access 2002 Runtime" & ",") elseif (titre_version = "1D") then file.write("Extensions serveur 2002 Microsoft FrontPage" & ",") elseif (titre_version = "1E") then file.write("Pack de l'interface utilisateur multilingue Microsoft Office" & ",") elseif (titre_version = "1F") then file.write("Kit d'outils de vérification orthographique Microsoft Office" & ",") elseif (titre_version = "20") then file.write("Mise à jour des fichiers systèmes" & ",") elseif (titre_version = "23") then file.write("Assistant Pack de l'interface utilisateur multilingue Microsoft Office" & ",") elseif (titre_version = "24") then file.write("Kit de ressources Microsoft Office XP" & ",") elseif (titre_version = "25") then file.write("Outils du kit de ressources Microsoft Office XP (téléchargement à partir du Web)" & ",") elseif (titre_version = "26") then file.write("Composants Web Microsoft Office" & ",") elseif (titre_version = "27") then file.write("Microsoft Project 2002" & ",") elseif (titre_version = "28") then file.write("Microsoft Office XP Professionnel avec FrontPage" & ",") elseif (titre_version = "29") then file.write("Abonnement Microsoft Office XP Edition Professionnelle" & ",") elseif (titre_version = "2A") then file.write("Abonnement Microsoft Office XP Edition PME" & ",") elseif (titre_version = "2B") then file.write("Microsoft Publisher 2002 Deluxe Edition" & ",") elseif (titre_version = "2F") then file.write("IME autonome (JPN uniquement)" & ",") elseif (titre_version = "30") then file.write("Contenu Microsoft Office XP Media" & ",") elseif (titre_version = "31") then file.write("Client Web Microsoft Project 2002" & ",") elseif (titre_version = "32") then file.write("Serveur Web Microsoft Project 2002" & ",") elseif (titre_version = "33") then file.write("Microsoft Office XP PIPC1 (PC pré-installé) (JPN uniquement)" & ",") elseif (titre_version = "34") then file.write("Microsoft Office XP PIPC2 (PC pré-installé) (JPN uniquement)" & ",") elseif (titre_version = "35") then file.write("Contenu de luxe Microsoft Office XP Media" & ",") elseif (titre_version = "3A") then file.write("Project 2002 Standard" & ",") elseif (titre_version = "3B") then file.write("Project 2002 Professional" & ",") elseif (titre_version = "51") then file.write("Microsoft Office Visio Professionnel 2003" & ",") elseif (titre_version = "53") then file.write("Microsoft Office Visio Standard 2003" & ",") else file.write("Microsoft Office XP non determiné" & ",") end if release = Mid(GUID, 2, 1) 'Détection release/SP if (release <= "8") then file.write("DAlpha/Beta/RC" & ",") elseif (release = "9") then file.write("Finale" & ",") elseif (release = "A") then file.write("SP1" & ",") elseif (release = "B") then file.write("SP2" & ",") elseif (release = "C") then file.write("SP3" & ",") else file.write("version non determinée" & ",") end if licence = Mid(GUID, 3, 1) 'Détection Open/Boite/OEM/Eval if (licence = "0") then file.write("Open") elseif (licence = "1") then file.write("Boite/OEM") elseif (licence = "2") then file.write("Demo") else file.write("Licence inconnue") end if end if if (version = 2000) then 'See http://support.microsoft.com/kb/230848/ titre_version = Mid(GUID, 4, 2) 'Récupération du nom exact du produit if (titre_version = "00") then file.write("Microsoft Office 2000 Premium Edition CD1") elseif (titre_version = "01") then file.write("Microsoft Office 2000 Professional Edition") elseif (titre_version = "02") then file.write("Microsoft Office 2000 Standard Edition") elseif (titre_version = "03") then file.write("Microsoft Office 2000 Small Business Edition") elseif (titre_version = "04") then file.write("Microsoft Office 2000 Premium CD2") elseif (titre_version = "05") then file.write("Office CD2 SMALL") elseif (titre_version = "10") then file.write("Microsoft Access 2000 (standalone)") elseif (titre_version = "11") then file.write("Microsoft Excel 2000 (standalone)") elseif (titre_version = "12") then file.write("Microsoft FrontPage 2000 (standalone)") elseif (titre_version = "13") then file.write("Microsoft PowerPoint 2000 (standalone)") elseif (titre_version = "14") then file.write("Microsoft Publisher 2000 (standalone)") elseif (titre_version = "15") then file.write("Office Server Extensions") elseif (titre_version = "16") then file.write("Microsoft Outlook 2000 (standalone)") elseif (titre_version = "17") then file.write("Microsoft Word 2000 (standalone)") elseif (titre_version = "18") then file.write("Microsoft Access 2000 runtime version") elseif (titre_version = "19") then file.write("FrontPage Server Extensions") elseif (titre_version = "1A") then file.write("Publisher Standalone OEM") elseif (titre_version = "1B") then file.write("DMMWeb") elseif (titre_version = "1C") then file.write("FP WECCOM") elseif (titre_version = "40") then file.write("Publisher Trial CD") elseif (titre_version = "41") then file.write("Publisher Trial Web") elseif (titre_version = "42") then file.write("SBB") elseif (titre_version = "43") then file.write("SBT") elseif (titre_version = "44") then file.write("SBT CD2") elseif (titre_version = "45") then file.write("SBTART") elseif (titre_version = "46") then file.write("Web Components") elseif (titre_version = "47") then file.write("VP Office CD2 with LVP") elseif (titre_version = "48") then file.write("VP PUB with LVP") elseif (titre_version = "49") then file.write("VP PUB with LVP OEM") elseif (titre_version = "4F") then file.write("Access 2000 SR-1 Run-Time Minimum") else file.write("Microsoft Office 2000 non determiné" & ",") end if release = Mid(GUID, 2, 2) 'Détection release/SP file.write(release & ",") end if End sub
TODO Liste:<
Historique:
Page générée en 0.005 secondes