Hi,
I am kind of new here, and have created already some tools that helped me a lot during the day.
However, I am having tough time getting this one right.
I have the following:
$file = FileOpen(@TempDir & "\sysinfo.txt", 1)
; Operation System
FileWrite($file, "Operation System - " & @TAB & @OSVersion & @CRLF)
; Physical Memory Installed
FileWrite($file, "Physical Memory Installed - " & @TAB & Round(GetMem() / 1024 ^2, 0) & " MB" & @CRLF)
Func GetMem($srv = "localhost")
Local $mem, $colItems, $colItem, $ping, $x
$ping = Ping($srv)
If $ping Then
$objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & $srv & "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select Capacity from Win32_PhysicalMemory", "WQL", 0x30)
If IsObj($colItems) Then
For $objItem In $colItems
$mem += $objItem.Capacity
Next
Return SetError(0, 0, $mem)
Else
Return SetError(2, 0, 0)
EndIf
Else
Return SetError(1, 0, 0)
EndIf
EndFunc
; Internet Explorer version
Local $ieVersion = FileGetVersion(@ProgramFilesDir & "\Internet Explorer\iexplore.exe")
FileWrite($file, "IE version - " & @TAB & $ieVersion & @CRLF)
; Firefox version
Local $ffVersion = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox', 'CurrentVersion')
FileWrite($file, "Firefox version - " & $ffVersion & @CRLF)
FileClose($file)
Which gives me the following text file:
Operation System - WIN_7
Physical Memory Installed - 2048 MB
IE version - 8.0.7600.16722
Firefox version - 3.6.13 (en-US)
But I want it to be array like this:
Operation System WIN_7
Physical Memory Installed 2048 MB
IE version 8.0.7600.16722
Firefox version 3.6.13 (en-US)
I've tried several ways offered here, but could get it right yet.
How can I do it ?
Thanks for the help! - Love it here!