#include #include _variables() _getinfos() _guiupdate() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case Else ;;; EndSelect Sleep(40) WEnd Func _getinfos() Global $Bin, $OS_description, $OS_install, $OS_key, $OS_last, $OS_name, $OS_serial Local $i, $Bin ProgressOn("Chargement de l'application", " ", "0 %") $t = TimerInit() If FileExists( @TempDir & "\tip.tmp") Then FileDelete(@TempDir & "\tip.tmp") EndIf InetGet ("http://www.whatismyip.org", @TempDir & "\tip.tmp",0,1) ;Pour les disques $var = DriveGetDrive("all");On prend tous les disques premièrement If Not @error Then $nombre_disques = $var[0] For $i = 1 To $var[0] $space = Int(DriveSpaceTotal($var[$i])) If $space >= 1000 Then $space = Round($space / 1000, 2) & " GB" Else $space = $space & " MB" EndIf $space2 = Int(DriveSpaceFree($var[$i])) If $space2 >= 1000 Then $space2 = Round($space2 / 1000, 2) & " GB" Else $space2 = $space2 & " MB" EndIf Assign("Disque_" & $i, StringLeft($var[$i], 1), 2) Assign("Disque_" & StringLeft($var[$i], 1) & "_VOL", DriveGetLabel($var[$i]), 2) Assign("Disque_" & StringLeft($var[$i], 1) & "_SERIAL", DriveGetSerial($var[$i]), 2) Assign("Disque_" & StringLeft($var[$i], 1) & "_TOTAL", $space, 2) Assign("Disque_" & StringLeft($var[$i], 1) & "_FREE", $space2, 2) ProgressSet(Int(($i / $var[0]) * 100)-60, Int(($i / $var[0]) * 100)-60 & "%") Next EndIf ;----------------------------------------------------------- $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL",0x10 + 0x20) $i = 0 If IsObj($colItems) then For $objItem In $colItems $i = $i + 1 Assign($i & "_Caption" , $objItem.Caption ,2) Assign($i & "_ExecutablePath" , $objItem.ExecutablePath ,2) Assign($i & "_Handle" , $objItem.Handle ,2) ProgressSet(Int(($i / 30) * 100), Int(($i / 30) * 100) & "%") Next ProgressSet(50, "50%") Assign("nombre_programmes",$i,2) EndIf ;----------------------------------------------------------- $Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID") $colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem") For $objOperatingSystem In $colSettings Next ProgressSet(50, "50%") $OS_description = StringMid($objOperatingSystem.Description, 1) $OS_name = StringMid($objOperatingSystem.Caption, 19) $OS_serial = StringMid($objOperatingSystem.SerialNumber, 1) $OS_key = DecodeProductKey($Bin) $OS_install = WMIDateStringToDate($objOperatingSystem.InstallDate) $OS_last = WMIDateStringToDate($objOperatingSystem.LastBootUpTime) ProgressSet(60, "60%") ;----------------------------------------------------------- $mem = MemGetStats() $ColSettings = $ObjWMIService.ExecQuery("Select * from Win32_Processor") ProgressSet(70, "71%") $i = 0 For $ObjOperatingSystem In $ColSettings $i= $i +1 $ProcFreq = $ObjOperatingSystem.CurrentClockSpeed $ProcName = $ObjOperatingSystem.Name ProgressSet(70 + $i, 70 + $i & "%") Sleep(30) Next ProgressSet(80, "80%") ;----------------------------------------------------------- $langue = _TMPcodePays(@OSLang) ;----------------------------------------------------------- $bios = regread("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\", "SystemBiosVersion") $biosdate = regread("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\", "SystemBiosDate") ;----------------------------------------------------------- ProgressSet(90, "90%") While @InetGetActive Sleep(10) WEnd If FileExists(@TempDir & "\tip.tmp") Then $ip = FileReadLine(@TempDir & "\tip.tmp") Else $ip = "Non Disponible" EndIf ProgressSet(100, "100%") Sleep(500) ProgressOff() EndFunc ;==>_getinfos Func _guiupdate() Local $i $hGUI = GUICreate("Computer Information - By : Timmalos", 490, 670, (@DesktopWidth - 490) / 2, (@DesktopHeight - 670) / 2, $WS_CAPTION + $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_VISIBLE + $WS_CLIPSIBLINGS) GUICtrlCreateTab(5, 10, 485, 630) ;666666666666666666666666666666666666666666666666666666666666666666 $tab0 = GUICtrlCreateTabItem("Informations Generales") $hTab0 = GUICtrlCreateListView(" Recherches | Résultats ", 10, 40, 475, 580, -1, 0x00000031) GUICtrlCreateListViewItem(" Dossier contenant le présent programme | " & @AutoItExe, $hTab0) GUICtrlCreateListViewItem(" Résolution d'Ecran | " & @DesktopWidth & "*" & @DesktopHeight, $hTab0) GUICtrlCreateListViewItem(" Rafraichissement d'Ecran | " & @DesktopRefresh & " Hertz", $hTab0) GUICtrlCreateListViewItem(" Qualité de la couleur | " & @DesktopDepth & " Bits", $hTab0) GUICtrlCreateListViewItem(" {Mois}{Date}{Année} | {" & @MON & "}{" & @MDAY & "}{" & @YEAR & "}", $hTab0) GUICtrlCreateListViewItem(" {Heure}{Minute}{Seconde} | {" & @HOUR & "}{" & @MIN & "}{" & @SEC & "}", $hTab0) GUICtrlCreateListViewItem(" {Jour de l'année}{Jour de la semaine} | {" & @YDAY & "}{" & @WDAY - 1 & "}", $hTab0) GUICtrlCreateListViewItem(" Nom d'Utilisateur | " & @UserName, $hTab0) GUICtrlCreateListViewItem(" Nom de l'Ordinateur | " & @ComputerName, $hTab0) GUICtrlCreateListViewItem(" Type de l'OS | " & @OSTYPE, $hTab0) GUICtrlCreateListViewItem(" Version de l'OS | " & @OSVersion, $hTab0) GUICtrlCreateListViewItem(" Nom complet de l'OS | " & $OS_name, $hTab0) GUICtrlCreateListViewItem(" Langue de l'OS | " & $langue, $hTab0) GUICtrlCreateListViewItem(" Suivi de l'OS | " & @OSBuild, $hTab0) GUICtrlCreateListViewItem(" Service Pack | " & @OSServicePack, $hTab0) GUICtrlCreateListViewItem(" Description de l'OS | " & $OS_description, $hTab0) GUICtrlCreateListViewItem(" Clef de l'OS | " & $OS_key, $hTab0) GUICtrlCreateListViewItem(" Numéro de Série de l'OS | " & $OS_serial, $hTab0) GUICtrlCreateListViewItem(" Date de l'installation de l'OS | " & $OS_install, $hTab0) GUICtrlCreateListViewItem(" Date du démarrage de l'ordinateur | " & $OS_last, $hTab0) ;;666666666666666666666666666666666666666666666666666666666666666666 $tab1 = GUICtrlCreateTabItem("Informations Disques") $hTab1 = GUICtrlCreateListView("Lettre | Nom du Disque | Numéro de Série | Espace Total | Espace Disponible ", 10, 40, 475, 580, -1, 0x00000031) For $i = 1 To $nombre_disques $disque = Eval("Disque_" & $i) GUICtrlCreateListViewItem($disque & "|" & Eval("Disque_" & $disque & "_VOL") & "|" & Eval("Disque_" & $disque & "_SERIAL") & "|" & Eval("Disque_" & $disque & "_TOTAL") & "|" & Eval("Disque_" & $disque & "_FREE"), $hTab1) Next ;;666666666666666666666666666666666666666666666666666666666666666666 $tab2 = GUICtrlCreateTabItem("Chemin des Dossiers Systèmes") $hTab2 = GUICtrlCreateListView(" Répertoire | Chemin ", 10, 40, 475, 580, -1, 0x00000031) GUICtrlCreateListViewItem(" Démarrage | " & @StartupDir, $hTab2) GUICtrlCreateListViewItem(" Windows | " & @WindowsDir, $hTab2) GUICtrlCreateListViewItem(" Système | " & @SystemDir, $hTab2) GUICtrlCreateListViewItem(" Bureau | " & @DesktopDir, $hTab2) GUICtrlCreateListViewItem(" Mes Documents | " & @MyDocumentsDir, $hTab2) GUICtrlCreateListViewItem(" Program Files | " & @ProgramFilesDir, $hTab2) GUICtrlCreateListViewItem(" Fichiers Communs | " & @CommonFilesDir, $hTab2) GUICtrlCreateListViewItem(" Dossier Temporaire | " & @TempDir, $hTab2) GUICtrlCreateListViewItem(" Menu Démarrer | " & @StartMenuDir, $hTab2) GUICtrlCreateListViewItem(" Favoris | " & @FavoritesDir, $hTab2) GUICtrlCreateListViewItem(" Profil Utilisateur | " & @UserProfileDir, $hTab2) GUICtrlCreateListViewItem(" Fichiers des Programmes | " & @AppDataDir, $hTab2) GUICtrlCreateListViewItem(" Repertoire contenant le profil utilisateur | " & @HomeDrive & @HomePath, $hTab2) ;;666666666666666666666666666666666666666666666666666666666666666666 $tab3 = GUICtrlCreateTabItem("Réseau & Internet") $hTab3 = GUICtrlCreateListView(" Recherches | Résultats ", 10, 40, 475, 580, -1, 0x00000031) GUICtrlCreateListViewItem(" Nom sur la connexion réseau | " & @HomeShare, $hTab3) GUICtrlCreateListViewItem(" Nom sur le serveur DNS | " & @LogonDNSDomain, $hTab3) GUICtrlCreateListViewItem(" Nom du domaine | " & @LogonDomain, $hTab3) GUICtrlCreateListViewItem(" Nom du Serveur | " & @LogonServer, $hTab3) GUICtrlCreateListViewItem(" Adresse IP Interne 1 | " & @IPAddress1, $hTab3) GUICtrlCreateListViewItem(" Adresse IP Interne 2 | " & @IPAddress2, $hTab3) GUICtrlCreateListViewItem(" Adresse IP Interne 3 | " & @IPAddress3, $hTab3) GUICtrlCreateListViewItem(" Adresse IP Externe | " & $ip, $hTab3) ;66666666666666666666666666666666666666666666666666666666666666666 $tab4 = GUICtrlCreateTabItem("Mémoire/Processeur/Bios") $hTab4 = GUICtrlCreateListView(" Recherches | Résultats ", 10, 40, 475, 580, -1, 0x00000031) GUICtrlCreateListViewItem(" Mémoire Physique Totale | " & Int($mem[1] / 1024) & " Mo", $hTab4) GUICtrlCreateListViewItem(" Mémoire Physique Libre | " & Int($mem[2] / 1024) & " Mo", $hTab4) GUICtrlCreateListViewItem(" Utilisation de la Mémoire Physique | " & $mem[0] & " %", $hTab4) GUICtrlCreateListViewItem(" Mémoire Virtuelle Totale | " & Int($mem[5] / 1024) & " Mo", $hTab4) GUICtrlCreateListViewItem(" Mémoire Virtuelle Libre | " & Int($mem[6] / 1024) & " Mo", $hTab4) GUICtrlCreateListViewItem(" Utilisation de l'UC | " & (100 - Int(($mem[6]/1024)/($mem[5]/1024)*100)) & " %", $hTab4) GUICtrlCreateListViewItem(" Nom du Processeur | " & $ProcName, $hTab4) GUICtrlCreateListViewItem(" Fréquence du Processeur | " & Round($ProcFreq/1000,3) & " GHz ", $hTab4) GUICtrlCreateListViewItem(" Nom du BIOS | " & $bios, $hTab4) GUICtrlCreateListViewItem(" Date du BIOS | " & $biosdate, $hTab4) ;66666666666666666666666666666666666666666666666666666666666666666 $tab5 = GUICtrlCreateTabItem("Programmes") $hTab5 = GUICtrlCreateListView(" Nom | Chemin de l'Executable | Handle ", 10, 40, 475, 580, -1, 0x00000031) For $i = 1 To $nombre_programmes GUICtrlCreateListViewItem(Eval( $i & "_Caption") & "|" & Eval( $i & "_ExecutablePath") & "|" & Eval( $i & "_Handle"), $hTab5) Next ;66666666666666666666666666666666666666666666666666666666666666666 GUICtrlCreateTabItem(""); end tabitem definition GUISetState() EndFunc ;==>_guiupdate Func _variables() Global $t, $nombre_disques, $msg,$mem,$ProcFreq,$ProcName,$langue,$bios,$biosdate,$ip Global $hStatus, $hGUI, $tab0, $tab1, $hTab EndFunc ;==>_variables ;--------------------------------------------------------------- ; ; ; ; ;--------------------------------------------------------------- Func DecodeProductKey($BinaryDPID) Local $bKey[15] Local $sKey[29] Local $Digits[24] Local $Value = 0 Local $hi = 0 Local $n = 0 Local $i = 0 Local $dlen = 29 Local $slen = 15 Local $Result $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "") $BinaryDPID = StringMid($BinaryDPID, 105, 30) For $i = 1 To 29 Step 2 $bKey[Int($i / 2)] = Dec(StringMid($BinaryDPID, $i, 2)) Next For $i = $dlen - 1 To 0 Step -1 If Mod(($i + 1), 6) = 0 Then $sKey[$i] = "-" Else $hi = 0 For $n = $slen - 1 To 0 Step -1 $Value = BitOR(BitShift($hi, -8), $bKey[$n]) $bKey[$n] = Int($Value / 24) $hi = Mod($Value, 24) Next $sKey[$i] = $Digits[$hi + 1] EndIf Next For $i = 0 To 28 $Result = $Result & $sKey[$i] Next Return $Result EndFunc ;==>DecodeProductKey Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 7, 2) & "/" & _ StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2)) EndFunc ;==>WMIDateStringToDate Func _TMPcodePays($func_langue) Local $CodePays = StringSplit("0436 Afrikaans,041c Albanian,0401 Arabic_Saudi_Arabia" & _ ",0801 Arabic_Iraq,0c01 Arabic_Egypt,1001 Arabic_Libya,1401 Arabic_Algeria" & _ ",1801 Arabic_Morocco,1c01 Arabic_Tunisia,2001 Arabic_Oman,2401 Arabic_Yemen" & _ ",2801 Arabic_Syria,2c01 Arabic_Jordan,3001 Arabic_Lebanon,3401 Arabic_Kuwait" & _ ",3801 Arabic_UAE,3c01 Arabic_Bahrain,4001 Arabic_Qatar,042b Armenian" & _ ",042c Azeri_Latin,082c Azeri_Cyrillic,042d Basque,0423 Belarusian" & _ ",0402 Bulgarian,0403 Catalan,0404 Chinese_Taiwan,0804 Chinese_PRC" & _ ",0c04 Chinese_Hong_Kong,1004 Chinese_Singapore,1404 Chinese_Macau" & _ ",041a Croatian,0405 Czech,0406 Danish,0413 Dutch_Standard" & _ ",0813 Dutch_Belgian,0409 English_United_States,0809 English_United_Kingdom" & _ ",0c09 English_Australian,1009 English_Canadian,1409 English_New_Zealand" & _ ",1809 English_Irish,1c09 English_South_Africa,2009 English_Jamaica" & _ ",2409 English_Caribbean,2809 English_Belize,2c09 English_Trinidad" & _ ",3009 English_Zimbabwe,3409 English_Philippines,0425 Estonian,0438 Faeroese" & _ ",0429 Farsi,040b Finnish,040C Français,080c French_Belgian" & _ ",0c0c French_Canadian,100c French_Swiss,140c French_Luxembourg" & _ ",180c French_Monaco,0437 Georgian,0407 German_Standard,0807 German_Swiss" & _ ",0c07 German_Austrian,1007 German_Luxembourg,1407 German_Liechtenstei" & _ ",408 Greek,040d Hebrew,0439 Hindi,040e Hungarian,040f Icelandic" & _ ",0421 Indonesian,0410 Italian_Standard,0810 Italian_Swiss,0411 Japanese" & _ ",043f Kazakh,0457 Konkani,0412 Korean,0426 Latvian,0427 Lithuanian" & _ ",042f Macedonian,043e Malay_Malaysia,083e Malay_Brunei_Darussalam" & _ ",044e Marathi,0414 Norwegian_Bokmal,0814 Norwegian_Nynorsk,0415 Polish" & _ ",0416 Portuguese_Brazilian,0816 Portuguese_Standard,0418 Romanian" & _ ",0419 Russian,044f Sanskrit,081a Serbian_Latin,0c1a Serbian_Cyrillic" & _ ",041b Slovak,0424 Slovenian,040a Spanish_Traditional_Sort" & _ ",080a Spanish_Mexican,0c0a Spanish_Modern_Sort,100a Spanish_Guatemala" & _ ",140a Spanish_Costa_Rica,180a Spanish_Panama,1c0a Spanish_Dominican_Republic" & _ ",200a Spanish_Venezuela,240a Spanish_Colombia,280a Spanish_Peru" & _ ",2c0a Spanish_Argentina,300a Spanish_Ecuador,340a Spanish_Chile" & _ ",380a Spanish_Uruguay,3c0a Spanish_Paraguay,400a Spanish_Bolivia" & _ ",440a Spanish_El_Salvador,480a Spanish_Honduras,4c0a Spanish_Nicaragua" & _ ",500a Spanish_Puerto_Rico,0441 Swahili,041d Swedish,081d Swedish_Finland" & _ ",0449 Tamil,0444 Tatar,041e Thai,041f Turkish,0422 Ukrainian,0420 Urdu" & _ ",0443 Uzbek_Latin,0843 Uzbek_Cyrillic,042a Vietnamese", ",") Local $x,$T For $x = 1 To $CodePays[0] - 1 $T = StringSplit($CodePays[$x], " ") If StringInStr($T[1], $func_langue) Then Return $T[2] Next Return $func_langue EndFunc ;==>_TMPcodePays