#include #include ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $VARIABLES $t = @TAB $tt = @TAB & @TAB $ttt = @TAB & @TAB & @TAB $tttt = @TAB & @TAB & @TAB & @TAB $font = "Arial Black" $RegReadProcType = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString") $Mem = MemGetStats() $MemTot = Round(($Mem[1]) / 1024, 0) + 1 $MemFree = Round(($Mem[2]) / 1024, 2) $MemUtil = $MemTot - $MemFree $OSVersion = @OSVersion ;Dim $VerWin = ("WIN_95|WIN_98|WIN_ME|WIN_NT4|WIN_2000|WIN_XP|WIN_2003|WIN_VISTA|WIN_2008") ;Dim $VerWinAct = ("Windows 95 |Windows 98 |Windows ME |Windows NT 4 |Windows 2000 |Windows XP |Windows Server 2003 |Windows Vi|Windows Server 2008 ") ;$OSVersion = StringSplit($VerWin, "|") ;$TypeOSVersion = StringSplit($VerWinAct, "|") $ObjWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $ColSettings = $ObjWMIService.ExecQuery("Select * from Win32_OperatingSystem") For $ObjOperatingSystem In $ColSettings $TypeWin = $ObjOperatingSystem.Caption Next $MainGui = GUICreate("test", 460, 640, (@DesktopWidth - 460) / 2, (@DesktopHeight - 640) / 2); , $WS_EX_STATICEDGE) ; Crée une frame de 460x640 au centre de l'écran $tab = GUICtrlCreateTab(0, 15, 462, 540) ; Crée le système d'onglet GUISetState() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TAB SYSTEM $tab0 = GUICtrlCreateTabItem("Résumé") GUICtrlCreateLabel("Matériel:", 20, 50, 180, 20) GUICtrlSetFont(-1, 9, 180, 4, $font) GUICtrlCreateLabel("Carte-mère:" & $tt & $MBManufacturer & $t & $MBModel, 30, 65, 400, 20) GUICtrlCreateLabel("Bios:" & $ttt & $BIOSManufacturer & $t & $BIOSRev, 30, 80, 400, 20) GUICtrlCreateLabel("Processeur:" & $tt & $ProcName, 30, 95, 400, 20) GUICtrlCreateLabel("Mémoire:" & $tt & $MemTot & " Mo", 30, 110, 400, 20) GUICtrlCreateLabel("Graphique:" & $tt & $CGMarkModel, 30, 125, 400, 20) GUICtrlCreateLabel("Système:", 20, 145, 180, 20) GUICtrlSetFont(-1, 9, 180, 4, $font) GUICtrlCreateLabel("Système d'exploitation:" & $t & $TypeWin, 30, 160, 400, 20) If @OSServicePack <> "" Then GUICtrlCreateLabel("Service Pack:" & $tt & @OSServicePack, 30, 175, 400, 20) Else GUICtrlCreateLabel("Service Pack:" & $tt & "Aucun Service Pack n'est installé.", 30, 175, 400, 20) EndIf GUICtrlCreateLabel("Nom de l'ordinateur:" & $t & @ComputerName, 30, 190, 400, 20) GUICtrlCreateLabel("Nom de l'utilisateur:" & $t & @UserName, 30, 205, 400, 20) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TAB HARDWARE $tab1 = GUICtrlCreateTabItem("Hardware") GUICtrlSetState(-1, $GUI_SHOW); Premier onglet a être activé ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HARDGUI $HardGui = GUICreate("SSHARD", 460, 514, (@DesktopWidth - 456) / 2, (@DesktopHeight - 508) / 2, $WS_POPUPWINDOW, $WS_EX_APPWINDOW, $MainGui) $SSHard = GUICtrlCreateTab(10, 10, 442, 494) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HARDGUI-MATOS GUICtrlCreateTabItem("Matériel") GUICtrlCreateLabel("Caractéristiques du matériel:", 20, 35, 300, 20) GUICtrlSetFont(-1, 9, 180, 4, $font) GUICtrlCreateLabel("Carte-mère:", 30, 55, 300, 20) GUICtrlSetFont(-1, 8, 180, 4, $font) GUICtrlCreateLabel("Constructeur:" & $tt & $MBManufacturer, 40, 75, 300, 20) GUICtrlCreateLabel("Modéle et révision:" & $t & $MBModel & $t & $MBRev, 40, 90, 300, 20) GUICtrlCreateLabel("Chipset:" & $tt, 40, 105, 300, 20) GUICtrlCreateLabel("Southbridge:" & $tt, 40, 120, 300, 20) GUICtrlCreateLabel("Bios:", 30, 140, 300, 20) GUICtrlSetFont(-1, 8, 180, 4, $font) GUICtrlCreateLabel("Marque:" & $ttt & $BIOSManufacturer, 40, 160, 300, 20) GUICtrlCreateLabel("Version:" & $ttt & $BIOSRev, 40, 175, 300, 20) GUICtrlCreateLabel("Date:" & $ttt, 40, 190, 300, 20) GUICtrlCreateLabel("Processeur:", 30, 210, 300, 20) GUICtrlSetFont(-1, 8, 180, 4, $font) GUICtrlCreateLabel("Constructeur et code:" & $t & $ProcManufacturer, 40, 230, 300, 20) GUICtrlCreateLabel("Nom :" & $ttt & $ProcName, 40, 245, 400, 20) GUICtrlCreateLabel("Architecture:" & $tt & $ProcArch, 40, 260, 300, 20) GUICtrlCreateLabel("Socket:" & $ttt & $ProcSocket, 40, 275, 300, 20) GUICtrlCreateLabel("Gravure:" & $t, 40, 290, 300, 20) GUICtrlCreateLabel("Vitesse et voltage:" & $t & $ProcFreq & " Mhz" & $t & $ProcVolt / 10 & " Volts", 40, 305, 300, 20) GUICtrlCreateLabel("Cache L2:" & $tt & $ProcL2 & " Ko", 40, 320, 300, 20) GUICtrlCreateLabel("Mémoire:", 30, 340, 300, 20) GUICtrlSetFont(-1, 8, 180, 4, $font) GUICtrlCreateLabel("Constructeur:" & $t, 40, 360, 300, 20) GUICtrlCreateLabel("Modéle:" & $t, 40, 375, 300, 20) GUICtrlCreateLabel("Fréquence:" & $t & " Mhz", 40, 390, 300, 20) ;GUICtrlCreateLabel("Constructeur:" & $t, 40, 405, 300, 20) ;GUICtrlCreateLabel("Constructeur:" & $t, 40, 420, 300, 20) ;GUICtrlCreateLabel("Mémoire totale:" & $ttt & $MemTot & " Mo", 30, 110, 400, 20) ;GUICtrlCreateLabel("Mémoire utilisée:" & $ttt & $MemUtil & " Mo" & " - " & (Round((($MemUtil)*100/($MemTot)), 2)) & " %" , 30, 130, 400, 20) ;GUICtrlCreateLabel("Carte graphique:" & $ttt & "n/c", 30, 150, 400, 20) ;GUICtrlSetState(-1, $GUI_DISABLE) ;GUICtrlCreateLabel("Resolution d'écran:" & $tt & @DesktopWidth & " / " & @DesktopHeight, 30, 170, 400, 20) ;GUICtrlCreateLabel("Profondeur de couleurs:" & $tt & @DesktopDepth & " bits", 30, 190, 400, 20) ;GUICtrlCreateLabel("Raffraichissement:"& $tt & @DesktopRefresh & " Hz", 30, 210, 400, 20) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HARDGUI-DISK GUICtrlCreateTabItem("Disques") GUICtrlCreateLabel("Caractéristiques des disques:", 20, 35, 300, 20) GUICtrlSetFont(-1, 9, 180, 4, $font) $VolumeLabel = GUICtrlCreateLabel("Nom:", 30, 90, 150, 20) $DriveType = GUICtrlCreateLabel("Type de disque:", 30, 110, 150, 20) $TotalSpace = GUICtrlCreateLabel("Espace total:", 30, 130, 150, 20) $FreeSpace = GUICtrlCreateLabel("Espace libre:", 30, 150, 150, 20) $RefreshButton = GUICtrlCreateButton("Refresh", 320, 84, 45, 20) $DGDA = DriveGetDrive("ALL") Dim $MesValeurs For $i = 1 To $DGDA[0] $MesValeurs = $MesValeurs & $DGDA[$i] & "\ " & DriveGetLabel($DGDA[$i]) & '|' Next $CDisque = GUICtrlCreateCombo(" Choisissez un disque...", 180, 84, 135, 20, $CBS_DROPDOWNLIST) GUICtrlSetData($CDisque, $MesValeurs, "Choisissez un disque...") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ABOUT $TrackMenu = GUICtrlCreateContextMenu() $AboutItem = GUICtrlCreateMenuItem("À propos", $TrackMenu) GUICtrlCreateMenuItem("", $TrackMenu) $ExitItem = GUICtrlCreateMenuItem("Quitter", $TrackMenu) $About = "ATP_SysInfo par ATPconcept" GUISetState() WinSetTrans($HardGui, "", 255) While 1 $wpm = WinGetPos($MainGui) $x = $wpm[0] + 2 $y = $wpm[1] + 66 WinMove($HardGui, "", $x, $y) $Msg = GUIGetMsg() If $Msg = $ExitItem Or $Msg = -3 Or $Msg = -1 Then ExitLoop If $Msg = $AboutItem Then MsgBox(64, "À propos", $About) Select Case $Msg = $tab If GUICtrlRead($tab) = 0 Then GUISetState(@SW_HIDE, $HardGui) EndIf If GUICtrlRead($tab) = 1 Then GUISetState(@SW_SHOW, $HardGui) Else GUISetState(@SW_HIDE, $HardGui) EndIf Case $Msg = -3 Exit EndSelect WEnd Exit