papydall
Nombre de messages : 7017 Age : 74 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Script pour afficher la configuration totale de votre ordi Mar 3 Mar 2020 - 1:18 | |
| Le code ci-après génère (dans le dossier courant) un script CONFIG.VBS, l’exécute (pour créer un fichier INVENTAIRE.TXT) et affiche dans le bloc-notes l’inventaire de votre ordinateur. Et pour faire les choses au propre (une fois la tâche terminée) il supprime les deux fichiers qu’il vient de créer dans votre dossier courant, à savoir CONFIG.VBS et INVENTAIRE.TXT. REM : Vous pouvez garder le fichier INVENTAIRE.TXT si ça vous chante ! Pour cela, mettez en REM la ligne 15. L’inventaire contient : - Informations sur Windows - Détails techniques sur Windows - Carte-mère - Périphériques inclus sur la carte-mère (OnBoard) - BIOS - RAM - Processeur - Disques - Carte(s) vidéo - Carte(s) son - Imprimante(s) installée(s) - Carte(s) réseau(x) - Modem(s) - Ecran(s) - Utilisateurs et groupes d’utilisateurs de l’ordinateur - Logiciels installés - Etc .. - Code:
-
rem ============================================================================ rem Config.bas rem Script pour afficher la configuration totale de votre ordinateur rem D’après un script en VBS de Cresti sur le forum VBScript rem ============================================================================ dim d$ d$ = dir_current$ caption 0,"Inventaire de l'ordinateur" Generer_VBS(d$)
execute_wait "config.vbs" execute_wait "notepad.exe | inventaire.txt"
file_delete "config.vbs" file_delete "inventaire.txt" terminate rem ============================================================================ SUB Generer_VBS(d$) dim_local g$ : g$ = chr$(34) file_open_write 10,"config.vbs" file_writeln 10,"on error resume Next" file_writeln 10,"Set oShell = CreateObject("+g$+"wscript.Shell"+g$+")" file_writeln 10,"Set env = oShell.environment("+g$+"Process"+g$+")" file_writeln 10,"strComputer = env.Item("+g$+"Computername"+g$+")" file_writeln 10,"Const HKEY_LOCAL_MACHINE = &H80000002" file_writeln 10,"Const UnInstPath = "+g$+"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"+g$ file_writeln 10,"Set oReg=GetObject("+g$+"winmgmts:{impersonationLevel=impersonate}!\\"+g$+" &_" file_writeln 10,g$+".\root\default:StdRegProv"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+" - Inventaire de l'ordinateur "+g$+" & strComputer & "+g$+" - "+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf & vbCrLf" file_writeln 10,"Set objWMIService = GetObject("+g$+"winmgmts:\\"+g$+" & strComputer & "+g$+"\root\cimv2"+g$+")" file_writeln 10,"Set colItems = objWMIService.ExecQuery("+g$+"Select * from Win32_OperatingSystem"+g$+",,48)" file_writeln 10,"report = report & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Informations sur Windows"+g$+" & vbCrLf & "+g$+"******************************************" +g$+"& vbCrLf" file_writeln 10,"For Each objItem in colItems" file_writeln 10,"report = report & "+g$+"- Nom du poste: "+g$+" & strComputer & vbCrLf " file_writeln 10,"report = report & "+g$+"- Description de l'ordinateur: "+g$+" & objItem.Description & vbCrLf" file_writeln 10,"report = report & "+g$+"- Utilisateur possédant la licence Windows: "+g$+" & objItem.RegisteredUser & vbCrLf" file_writeln 10,"report = report & "+g$+"- Organisation possédant la licence Windows: "+g$+" & objItem.Organization & vbCrLf" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"- Nom du système d'exploitation: "+g$+" & objItem.Caption & vbCrLf" file_writeln 10,"If (objItem.OSProductSuite <> "+g$+""+g$+")Then" file_writeln 10,"report = report & "+g$+"- Système d'exploitation de la suite "+g$+" & objItem.OSProductSuite & vbCrLf" file_writeln 10,"End If" file_writeln 10,"report = report & "+g$+"- Version: "+g$+" & objItem.Version & vbCrLf" file_writeln 10,"report = report & "+g$+"- Date de son installation: "+g$+" & objItem.InstallDate & vbCrLf" file_writeln 10,"report = report & "+g$+"- Numéro de série de "+g$+" & objItem.Caption & "+g$+": "+g$+" & objItem.SerialNumber & vbCrLf" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Détails techniques sur Windows"+g$+"& vbCrlf" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"- Numéro du dernier Service Pack majeur installé: "+g$ file_writeln 10,"report = report & objItem.ServicePackMajorVersion & vbCrLf" file_writeln 10,"If (objItem.ServicePackMinorVersion<>0) AND (objItem.ServicePackMinorVersion<>"+g$+g$+") Then" file_writeln 10," report = report & "+g$+"- Numéro du dernier Service Pack mineur installé: "+g$+" & objItem.ServicePackMinorVersion & vbCrLf" file_writeln 10,"End If" file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Les Service Pack et les mises-à-jour de sécurité de Windows sont disponibles sur:"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"===> http://windowsupdate.microsoft.com <==="+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbCrLf & vbCrLf" file_writeln 10,"'report = report & "+g$+"- Emplacements du système d'exploitation sur l'ordinateur: "+g$+" & vbCrLf & objItem.Name & vbCrLf" file_writeln 10,"report = report & "+g$+"- Répertoire où Windows est installé: "+g$+" & objItem.WindowsDirectory & vbCrLf" file_writeln 10,"report = report & "+g$+"- Niveau d'encryption des données: "+g$+" & objItem.EncryptionLevel & "+g$+"bits"+g$+" & vbCrLf" file_writeln 10,"If (objItem.MaxNumberOfProcesses="+g$+"-1"+g$+") Then" file_writeln 10," report = report & "+g$+"- Maximum de processus pouvant être ouvert: Aucune limite fixée"+g$+" & vbCrLf" file_writeln 10,"Else" file_writeln 10," report = report & "+g$+"- Maximum de processus pouvant être ouvert: "+g$+" & objItem.MaxNumberOfProcesses & vbCrLf" file_writeln 10,"End If" file_writeln 10,"Next" file_writeln 10,"Set colBaseBoards = objWMIService.ExecQuery _" file_writeln 10,"("+g$+"Select * from Win32_BaseBoard"+g$+")" file_writeln 10,"report = report & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Carte-mère"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objBaseBoard in colBaseBoards" file_writeln 10," report = report & "+g$+"- Nom: "+g$+" & objBaseBoard.Name & vbCrLf" file_writeln 10," report = report & "+g$+"- Modèle: "+g$+" & objBaseBoard.Model & vbCrLf" file_writeln 10," report = report & "+g$+"- Manufacturier: "+g$+" & objBaseBoard.Manufacturer & vbCrLf" file_writeln 10," report = report & "+g$+"- Numéro de série: "+g$+" & objBaseBoard.SerialNumber & vbCrLf" file_writeln 10," report = report & "+g$+"- Numéro d'inventaire (SKU): "+g$+" & objBaseBoard.SKU & vbCrLf" file_writeln 10," report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colOnBoardDevices = objWMIService.ExecQuery _" file_writeln 10,"("+g$+"Select * from Win32_OnBoardDevice"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Périphériques inclus sur la carte-mère (OnBoard)"+g$+" & vbCrLf &" +g$ +"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objOnBoardDevice in colOnBoardDevices" file_writeln 10," report = report & "+g$+"- Nom du périphérique: "+g$+" & objOnBoardDevice.Name & vbCrLf" file_writeln 10," report = report & "+g$+"- Nom secondaire du périphérique: "+g$+" & objOnBoardDevice.Caption & vbCrLf" file_writeln 10," report = report & "+g$+"- Type de périphérique: "+g$+" & objOnBoardDevice.DeviceType & vbCrLf" file_writeln 10," report = report & "+g$+"- Modèle: "+g$+" & objOnBoardDevice.Model & vbCrLf" file_writeln 10," report = report & "+g$+"- Manufacturier: "+g$+" & objOnBoardDevice.Manufacturer & vbCrLf" file_writeln 10," report = report & "+g$+"- Numéro de série: "+g$+" & objOnBoardDevice.SerialNumber & vbCrLf" file_writeln 10," report = report & "+g$+"- Numéro d'inventaire (SKU): "+g$+" & objOnBoardDevice.SKU & vbCrLf" file_writeln 10," report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colBIOS = objWMIService.ExecQuery _" file_writeln 10,"("+g$+"Select * from Win32_BIOS"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"BIOS - Utilitaire de détection des disques et"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+" de gestion des composantes internes"+g$+" & vbCrLf & " + g$ + "******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objBIOS in colBIOS" file_writeln 10,"report = report & "+g$+"- Nom: "+g$+" & objBIOS.Name & vbCrLf" file_writeln 10,"report = report & "+g$+"- Code d'identification: "+g$+" & objBIOS.IdentificationCode & vbCrLf" file_writeln 10,"report = report & "+g$+"- Manufacturier: "+g$+" & objBIOS.Manufacturer & vbCrLf" file_writeln 10,"report = report & "+g$+"- BIOS primaire: "+g$+" & objBIOS.PrimaryBIOS & vbCrLf" file_writeln 10,"report = report & "+g$+"- Date de création: "+g$+" & objBIOS.ReleaseDate & vbCrLf" file_writeln 10,"report = report & "+g$+"- Numéro de série: "+g$+" & objBIOS.SerialNumber & vbCrLf" file_writeln 10,"report = report & "+g$+"- Version: "+g$+" & objBIOS.Version & vbCrLf" file_writeln 10,"report = report & "+g$+"- Version (SMBIOS): "+g$+" & objBIOS.SMBIOSBIOSVersion & vbCrLf" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colSettings = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_ComputerSystem"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Mémoire vive (RAM) et processeur"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objComputer in colSettings" file_writeln 10,"'report = report & objComputer.Name & vbcrlf" file_writeln 10,"report = report & "+g$+"- Vous avez actuellement "+g$+" & objComputer.TotalPhysicalMemory /1024\1024+1 & "+g$+" Mo de mémoire vive(RAM) au total."+g$+" & vbcrlf" file_writeln 10,"Next" file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"À titre de comparaison :"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"Si vous avez Windows NT, 95 ou 98 vous devriez avoir au moins 64 Mo"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+" de mémoire vive pour une utilisation confortable"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"Si vous avez Windows 2000, vous devriez avoir au moins 128 Mo de"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+" mémoire vive pour une utilisation confortable"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"Si vous avez Windows XP ou 2003, vous devriez avoir au moins 256 Mo"+g$ +"& vbcrlf" file_writeln 10,"report = report & "+g$+" de mémoire vive pour une utilisation confortable"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbcrlf & vbCrLf" file_writeln 10,"Set colSettings = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_Processor"+g$+")" file_writeln 10,"For Each objProcessor in colSettings" file_writeln 10,"report = report & "+g$+"- Type de processeur: "+g$ file_writeln 10,"If objProcessor.Architecture = 0 Then" file_writeln 10,"report = report & "+g$+"x86"+g$+" & vbCrLf" file_writeln 10,"ElseIf objProcessor.Architecture = 1 Then" file_writeln 10," report = report & "+g$+"MIPS"+g$+" & vbCrLf" file_writeln 10,"ElseIf objProcessor.Architecture = 2 Then" file_writeln 10," report = report & "+g$+"Alpha"+g$+" & vbCrLf" file_writeln 10,"ElseIf objProcessor.Architecture = 3 Then" file_writeln 10," report = report & "+g$+"PowerPC"+g$+" & vbCrLf" file_writeln 10," ElseIf objProcessor.Architecture = 6 Then" file_writeln 10," report = report & "+g$+"ia64"+g$+" & vbCrLf" file_writeln 10," Else" file_writeln 10," report = report & "+g$+"inconnu"+g$+" & vbCrLf" file_writeln 10," End If" file_writeln 10," report = report & "+g$+"- Nom du processeur: "+g$+" & objProcessor.Name & vbCrLf" file_writeln 10," report = report & "+g$+"- Description du processeur: "+g$+" & objProcessor.Description & vbCrLf" file_writeln 10," report = report & "+g$+"- Vitesse actuelle du processeur: "+g$+" & objProcessor.CurrentClockSpeed & "+g$+" Mhz"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"- Vitesse maximale du processeur: "+g$+" & objProcessor.MaxClockSpeed & "+g$+" Mhz"+g$+" & vbCrLf" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Disque(s) dur(s) et autres lecteurs actuellement "+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"en usage"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"Dim oFSO" file_writeln 10,"Set oFSO = WScript.CreateObject("+g$+"Scripting.FileSystemObject"+g$+")" file_writeln 10,"Dim oDesLecteurs" file_writeln 10,"Set oDesLecteurs = oFSO.Drives" file_writeln 10,"Dim oUnLecteur" file_writeln 10,"Dim strLectType" file_writeln 10,"For Each oUnLecteur in oDesLecteurs" file_writeln 10,"If oUnLecteur.IsReady Then" file_writeln 10,"Select Case oUnLecteur.DriveType" file_writeln 10,"Case 0: strLectType = "+g$+"Inconnu"+g$ file_writeln 10,"Case 1: strLectType = "+g$+"Amovible (Disquette, clé USB, etc.)"+g$ file_writeln 10,"Case 2: strLectType = "+g$+"Fixe (Disque dur, etc.)"+g$ file_writeln 10,"Case 3: strLectType = "+g$+"Réseau"+g$ file_writeln 10,"Case 4: strLectType = "+g$+"CD-Rom"+g$ file_writeln 10,"Case 5: strLectType = "+g$+"Virtuel"+g$ file_writeln 10,"End Select" file_writeln 10,"report = report & "+g$+"- Lettre du lecteur: "+g$+" & oUnLecteur.DriveLetter & vbCrLf" file_writeln 10,"report = report & "+g$+"- Numéro de série: "+g$+" & oUnLecteur.SerialNumber & vbCrLf" file_writeln 10,"report = report & "+g$+"- Type de lecteur: "+g$+" & oUnLecteur.strLectType & vbCrLf" file_writeln 10,"If (oUnLecteur.FileSystem <> "+g$+""+g$+") Then" file_writeln 10," report = report & "+g$+"- Système de fichier utilisé: "+g$+" & oUnLecteur.FileSystem & vbCrLf" file_writeln 10," End If" file_writeln 10,"Set objWMIService = GetObject("+g$+"winmgmts:"+g$+")" file_writeln 10,"Set objLogicalDisk = objWMIService.Get("+g$+"Win32_LogicalDisk.DeviceID='"+g$+" & oUnLecteur.DriveLetter & "+g$+":'"+g$+")" file_writeln 10,"report = report & "+g$+"- Il y a "+g$+" & objLogicalDisk.FreeSpace /1024\1024+1 & "+g$+" Mo d'espace restant sur ce lecteur/disque"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"- Il y a "+g$+" & objLogicalDisk.Size /1024\1024+1 & "+g$+" Mo d'espace au total sur ce lecteur/disque"+g$+" & vbCrLf" file_writeln 10,"End If" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colCartesVideo = objWMIService.ExecQuery _" file_writeln 10,"("+g$+"Select Description From Win32_VideoController"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Carte(s) vidéo"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objCarteVideo in colCartesVideo" file_writeln 10,"report = report & "+g$+"- Nom de la carte: "+g$+" & objCarteVideo.Description & vbcrlf" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colSoundDevices = objWMIService.ExecQuery _ " file_writeln 10,"("+g$+"Select * from Win32_SoundDevice"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Carte(s) de son"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objSoundDevice in colSoundDevices" file_writeln 10,"report = report & "+g$+"- Nom de la carte: "+g$+" & objSoundDevice.Description & vbCrLf" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colInstalledPrinters = objWMIService.ExecQuery _" file_writeln 10,"("+g$+"Select * from Win32_Printer"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Imprimante(s) installée(s)"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objPrinter in colInstalledPrinters" file_writeln 10,"If objPrinter.Default = "+g$+"True"+g$+" Then" file_writeln 10," report = report & "+g$+"- Nom de l'imprimante (par défaut): "+g$+" & objPrinter.Name & vbCrLf" file_writeln 10," Else " file_writeln 10," report = report & "+g$+"- Nom de l'imprimante: "+g$+" & objPrinter.Name & vbCrLf" file_writeln 10,"End If" file_writeln 10,"report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colAdapters = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_NetworkAdapter"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf " file_writeln 10,"report = report & "+g$+"Carte(s) réseau(x)"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objAdapter in colAdapters" file_writeln 10,"If (objAdapter.Manufacturer<>"+g$+"Microsoft"+g$+") Then " file_writeln 10," 'report = report & "+g$+"- Nom de la carte/adapteur (Caption): "+g$+" & objAdapter.Caption & vbcrlf" file_writeln 10,"report = report & "+g$+"- Nom de la carte/adapteur: "+g$+" & objAdapter.Name & vbcrlf" file_writeln 10,"report = report & "+g$+"- Type de la carte/adapteur: "+g$+" & objAdapter.AdapterType & vbcrlf" file_writeln 10,"'report = report & "+g$+"- État actuel: "+g$+" & objAdapter.Availability & vbcrlf" file_writeln 10," report = report & "+g$+"- Description: "+g$+" & objAdapter.Description & vbcrlf" file_writeln 10," report = report & "+g$+"- Adresse MAC: "+g$+" & objAdapter.MACAddress & vbcrlf" file_writeln 10,"'report = report & "+g$+"- Adresse réseau de la carte: "+g$+" & objAdapter.NetworkAddresses & vbcrlf" file_writeln 10," 'report = report & "+g$+"- Adresse préprogrammée: "+g$+" & objAdapter.PermanentAddress & vbcrlf" file_writeln 10," report = report & "+g$+"- Nom du fabricant: "+g$+" & objAdapter.Manufacturer & vbcrlf" file_writeln 10,"report = report & "+g$+"- Nom du produit: "+g$+" & objAdapter.ProductName & vbcrlf " file_writeln 10," report = report & "+g$+"- Nom de service: "+g$+" & objAdapter.ServiceName & vbcrlf " file_writeln 10," report = report & "+g$+"- Vitesse maximale: "+g$+" & objAdapter.MaxSpeed & vbcrlf" file_writeln 10," 'If (objAdapter.Speed = 0) Or (objAdapter.Speed = "+g$+""+g$+") Then" file_writeln 10," ' report = report & "+g$+"- Bande passante actuelle: Non-disponible ou si faible "
file_writeln 10,"qu'elle indique 0"+g$+" & vbcrlf" file_writeln 10," 'Else" file_writeln 10,"' report = report & "+g$+"- Bande passante actuelle: "+g$+" & objAdapter.Speed & vbcrlf" file_writeln 10,"'End If" file_writeln 10,"'report = report & "+g$+"- Date de la dernière réinitialisation: "+g$+" & objAdapter.TimeOfLastReset & vbcrlf" file_writeln 10,"Set colAdaptersConf = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_NetworkAdapterConfiguration"+g$+")" file_writeln 10," For Each objAdapterConf in colAdaptersConf" file_writeln 10," If (objAdapter.Manufacturer<>"+g$+"Microsoft"+g$+") AND (objAdapter.Caption = objAdapterConf.Caption) Then" file_writeln 10," report = report & "+g$+"==> Configurations de la carte réseau <=="+g$+" & vbcrlf " file_writeln 10," report = report & "+g$+"- Adresse IP: "+g$+" & objAdapterConf.IPAddress & vbcrlf" file_writeln 10," report = report & "+g$+"- Masque de sous-réseau: "+g$+" & objAdapterConf.IPSubnet & vbcrlf" file_writeln 10," report = report & "+g$+"- Le DHCP (Attribution automatique d'une adresse IP par un serveur DHCP) est-il activé:"+g$+" & vbCrLf " file_writeln 10," report = report & objAdapterConf.DHCPEnabled & vbcrlf" file_writeln 10," report = report & "+g$+"- Serveur DHCP: "+g$+" & objAdapterConf.DHCPServer & vbcrlf " file_writeln 10," report = report & "+g$+"- Serveur(s) DNS: "+g$+" & objAdapterConf.DNSServerSearchOrder & vbcrlf" file_writeln 10," End If" file_writeln 10," Next" file_writeln 10,"End If " file_writeln 10,"Next" file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"Si vous ne pouvez naviguer et que les configurations IP semblent correctes,"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"vous pouvez essayer l'utilitaire WinsockFix.exe =>"+g$+" & vbcrlf" file_writeln 10,"report = report & "+g$+"http://www.google.ca/search?hl=fr&rls=GGLD%2CGGLD%3A2004-30%2CGGLD%3Afr&q=winsockfix.exe+download&btnG=Rechercher&meta="+g$+" & vbcrlf " file_writeln 10,"report = report & "+g$+"- - - - - -"+g$+" & vbcrlf" file_writeln 10,"report = report & vbcrlf" file_writeln 10,"Set colPOTSModems = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_POTSModem"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"report = report & "+g$+"Modem(s)"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf " file_writeln 10,"For Each objPOTSModem in colPOTSModems" file_writeln 10," report = report & "+g$+"- Nom du modem: "+g$+" & objPOTSModem.Description & vbCrLf " file_writeln 10," report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"Set colEcrans = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_Win32_DesktopMonitor"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf " file_writeln 10,"report = report & "+g$+"Écran(s)"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objEcran in colEcrans" file_writeln 10," report = report & "+g$+"- Nom de l'écran: "+g$+" & objEcran.Name & vbCrLf" file_writeln 10," report = report & "+g$+"- Type d'écran: "+g$+" & objEcran.MonitorType & vbCrLf" file_writeln 10," report = report & "+g$+"- Nom du fabricant: "+g$+" & objEcran.MonitorManufacturer & vbCrLf " file_writeln 10," report = report & "+g$+"- Hauteur: "+g$+" & objEcran.ScreenHeight & vbCrLf" file_writeln 10," report = report & "+g$+"- Largeur: "+g$+" & objEcran.ScreenWeight & vbCrLf" file_writeln 10," report = report & vbCrLf" file_writeln 10,"Next" file_writeln 10,"' report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"' report = report & "+g$+"Listes des connexions réseaux"+g$+"& vbCrlf" file_writeln 10,"' report = report & "+g$+"=> Cette section peut parfois être vide même s'il"+g$+" & vbCrLf" file_writeln 10,"' report = report & "+g$+" existe des connexions réseaux <="+g$+" & vbCrLf " file_writeln 10,"' report = report & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"'Set colConnReseaux = objWMIService.ExecQuery _" file_writeln 10,"' ("+g$+"Select * from Win32_NetworkConnection"+g$+")" file_writeln 10,"'For Each objConnReseau in colConnReseaux" file_writeln 10,"' report = report & "+g$+"- Nom de la carte/adapteur: "+g$+" & objConnReseau.Name & vbcrlf" file_writeln 10,"' report = report & "+g$+"- Nom local: "+g$+" & objConnReseau.LocalName & vbcrlf " file_writeln 10,"' report = report & "+g$+"- Nom d'utilisateur: "+g$+" & objConnReseau.UserName & vbcrlf " file_writeln 10,"' report = report & "+g$+"- Type: "+g$+" & objConnReseau.DisplayType & vbcrlf " file_writeln 10,"' report = report & "+g$+"- Description: "+g$+" & objConnReseau.Description & vbcrlf" file_writeln 10,"' report = report & "+g$+"- État actuel de la connexion: "+g$+" & objConnReseau.ConnectionState & vbcrlf" file_writeln 10,"' report = report & "+g$+"- Nom du fournisseur: "+g$+" & objConnReseau.ProviderName & vbcrlf " file_writeln 10,"' report = report & "+g$+"- Nom de la ressource distante: "+g$+" & objConnReseau.RemoteName & vbcrlf" file_writeln 10,"' report = report & "+g$+"- Type de ressource: "+g$+" & objConnReseau.ResourceType & vbcrlf " file_writeln 10,"' report = report & "+g$+"- Commentaire du fournisseur: "+g$+" & objConnReseau.Comment & vbcrlf" file_writeln 10,"' report = report & vbcrlf" file_writeln 10,"'Next" file_writeln 10,"Set colUsagers = objWMIService.ExecQuery _" file_writeln 10," ("+g$+"Select * from Win32_Account"+g$+")" file_writeln 10,"report = report & "+g$+"******************************************"+g$+" & vbCrLf " file_writeln 10,"report = report & "+g$+"Utilisateurs et groupes d'utilisateurs de cet ordinateur"+g$+" & vbCrLf &" +g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each objUsager in colUsagers" file_writeln 10," report = report & "+g$+"- Nom de l'usager ou du groupe: "+g$+" & objUsager.Name & vbcrlf " file_writeln 10," report = report & "+g$+"- Description: "+g$+" & objUsager.Description & vbcrlf " file_writeln 10," report = report & "+g$+"- Domaine ou ordinateur auquel il appartient: "+g$+" & objUsager.Domain & vbcrlf" file_writeln 10," 'report = report & "+g$+"- Numéro d'identification (SID): "+g$+" & objUsager.SID & vbcrlf " file_writeln 10," report = report & vbcrlf" file_writeln 10,"Next" file_writeln 10,"oReg.EnumKey HKEY_LOCAL_MACHINE, UnInstPath, arrSubKeys" file_writeln 10,"software = "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"software = software & "+g$+"Logiciels installés"+g$+" & vbCrLf & "+g$+"******************************************"+g$+" & vbCrLf" file_writeln 10,"For Each subkey In arrSubKeys" file_writeln 10," 'MsgBox subkey" file_writeln 10," If Left (subkey, 1) <> "+g$+"{"+g$+" Then " file_writeln 10," software = software & subkey & vbCrLf " file_writeln 10," End If" file_writeln 10,"Next" file_writeln 10,"software = software & "+g$+"- - - - - -"+g$+" & vbCrLf" file_writeln 10,"software = software & "+g$+"Assurez-vous d'avoir dans la liste ci-dessus:"+g$+" & vbCrLf " file_writeln 10,"software = software & "+g$+"- Un anti-virus => Si non, voir http://www.sogetel.net/virus/"+g$+" & vbCrLf " file_writeln 10,"software = software & "+g$+"- Un logiciel anti-espiogiciel => Si non, voir http://www.sogetel.net/espions/"+g$+" & vbCrLf" file_writeln 10,"software = software & "+g$+"- Certaines mises-à-jour de Windows (Elle commence fréquemment par KB#### ou bien par Q###)"+g$+" & vbCrLf" file_writeln 10,"software = software & "+g$+"- - - - - -"+g$+" & vbCrLf" file_writeln 10,"software = software & vbCrLf " file_writeln 10,"Set fso = CreateObject("+g$+"Scripting.FileSystemObject"+g$+")" file_writeln 10,"'Détermine si le fichier texte existe déjà ou s'il doit le créer " file_writeln 10,"If Not fso.FileExists("+g$+d$+"\inventaire.txt"+g$+") Then" file_writeln 10," set ts = fso.CreateTextFile("+g$+d$+"\inventaire.txt"+g$+")" file_writeln 10,"End If" file_writeln 10,"ts.write report" file_writeln 10,"ts.write software" file_writeln 10,"'MsgBox Report" file_writeln 10,"WScript.Exit"
file_close 10 END_SUB rem ============================================================================
| |
|