Alors voila, j'en suis toujours avec mon sysinfo....
pour determiner l'os presisement, j'avais fait ca
Code : Tout sélectionner
$OSVersion = @OSVersion
if @OSVersion = "WIN_95" Then
$OSVersion = "Windows 95"
EndIf
If @OSVersion = "WIN_98" Then
$OSVersion = "Windows 98"
EndIf
If @OSVersion = "WIN_ME" Then
$OSVersion = "Windows ME"
EndIf
If @OSVersion = "WIN_NT4" Then
$OSVersion = "Windows NT 4"
EndIf
If @OSVersion = "WIN_2000" Then
$OSVersion = "Windows 2000"
EndIf
If @OSVersion = "WIN_XP" Then
$OSVersion = "Windows XP"
EndIf
If @OSVersion = "WIN_2003" Then
$OSVersion = "Windows Server 2003"
EndIf
If @OSVersion = "WIN_VISTA" Then
$OSVersion = "Windows Vista"
EndIf
$ObjWMIService = objget ( "winmgmts:{impersonationLevel = impersonate}!\\.\root\cimv2" )
$ColSettings = $objWMIService.ExecQuery ( "Select * from Win32_OperatingSystem" )
For $ObjOperatingSystem in $ColSettings
$TypeWin = StringMid ( $ObjOperatingSystem.Caption , 22 )
Next
MsgBox ( 0 , "Version de Windows installée" , $OSVersion & $TypeWin )
Code : Tout sélectionner
$OSVersion = @OSVersion
$ObjGetWMIService = objget ( "winmgmts:{impersonationLevel = impersonate}!\\.\root\cimv2" )
$ColSettings = $objGetWMIService.ExecQuery ( "Select * from Win32_OperatingSystem" )
For $ObjOperatingSystem in $ColSettings
$TypeWin = StringMid ( $ObjOperatingSystem.Caption , 22 )
Next
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 Vista" & "|" & "Windows Server 2008"
$OSVersion = stringsplit ( $VerWin , "|" )
$TypeOSVersion = stringsplit ( $VerWinAct , "|" )
for $i = 1 to $OSVersion[0]
for $i = 1 To $TypeOSVersion[0]
if @error then ExitLoop
if not @error then MsgBox ( 0 , "Version de Windows installée" , $TypeOSVersion[$i] & " " & $TypeWin )
endif
next
Next
Vous remerciant par avance
Edit: le WIN_2008, c'est pour prendre un peu d'avance ^^