$os Windows 8 - 26/12/12 11:07 PM
I have the 'need to get the version of the Windows 8 operating system using the' identifier $ os. Use the mIRC 7.27. Using $ os restores my version of Windows 7. How to solve this problem?
; jethro ~ http://www.hawkee.com/snippet/6283/#c57267 alias wmiget { var %com = cominfo, %com2 = cominfo2, %com3 = cominfo3 if ($com(%com)) { .comclose %com } if ($com(%com2)) { .comclose %com2 } if ($com(%com3)) { .comclose %com3 } .comopen %com WbemScripting.SWbemLocator var %x = $com(%com,ConnectServer,3,dispatch* %com2), $& %x = $com(%com2,ExecQuery,3,bstr*,select $prop from $1,dispatch* %com3), $& %x = $comval(%com3,$iif($2,$2,1),$prop) if ($com(%com)) { .comclose %com } if ($com(%com2)) { .comclose %com2 } if ($com(%com3)) { .comclose %com3 } return %x }
//echo -a -> $wmiget(Win32_OperatingSystem).Caption
//echo -a -> $gettok($wmiget(Win32_OperatingSystem).Caption,3,32)
;get process info about ram and virtual memory usage ;/getproc <process name> ;don't add .exe next to process name ; $wmiget comes from http://www.mircscripts.org/showdoc.php?type=code&id=3218 alias wmiget { var %com = cominfo, %com2 = cominfo2, %com3 = cominfo3 if ($com(%com)) { .comclose %com } if ($com(%com2)) { .comclose %com2 } if ($com(%com3)) { .comclose %com3 } .comopen %com WbemScripting.SWbemLocator var %x = $com(%com,ConnectServer,3,dispatch* %com2), %x = $com(%com2,ExecQuery,3,bstr*,select $prop from $1,dispatch* %com3), %x = $comval(%com3,$iif($2,$2,1),$prop) if ($com(%com)) { .comclose %com } if ($com(%com2)) { .comclose %com2 } if ($com(%com3)) { .comclose %com3 } return %x } alias getproc { say OS: $chr(91) $+ $wmiget(Win32_OperatingSystem).Caption $+ $chr(93) Running processes: $chr(91) $+ $wmiget(Win32_OperatingSystem).NumberOfProcesses $+ $chr(93) Process Name: $chr(91) $+ $wmiget(win32_process where (description=" $+ $1 $+ .exe")).description $+ $chr(93) PID: $chr(91) $+ $wmiget(win32_process where (description=" $+ $1 $+ .exe")).ProcessId $+ $chr(93) Mem Usage: $chr(91) $+ $bytes($wmiget(win32_process where (description=" $+ $1 $+ .exe")).WorkingSetSize,m).suf $+ $chr(93) VM Size: $chr(91) $+ $bytes($wmiget(win32_process where (description=" $+ $1 $+ .exe")).VirtualSize,m).suf $+ $chr(93) VM Peak: $chr(91) $+ $bytes($wmiget(win32_process where (description=" $+ $1 $+ .exe")).PeakVirtualSize,m).suf $+ $chr(93) } menu status,channel,nicklist,query { - Process Info .getProc:/getproc $$?="" - }
alias version_x { if ($1 = version) { if ((7 isin $wmiget(Win32_OperatingSystem).Caption)) { return Windows 7 Ultimate $wmiget(Win32_OperatingSystem).Caption } if ((8 isin $wmiget(Win32_OperatingSystem).Caption)) { return Windows 8 Pro $wmiget(Win32_OperatingSystem).Caption } else { return $wmiget(Win32_OperatingSystem).Caption } } } ; Button that will appear in the version of Windows 7 if ($xdialog(start, 491).isid != $true) && ((7 isin $wmiget(Win32_OperatingSystem).Caption)) { ;// Initialising control:Aero7Tuner (Button 491)