#include <Constants.au3>
$iRun_PID = Run(@ComSpec & ' /C tasklist', '', @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
$sProcesses_List = ""
While 1
$sProcesses_List &= StdoutRead($iRun_PID)
If @error Then ExitLoop
WEnd
$sProcesses_List = StringStripWS($sProcesses_List, 3)
MsgBox(64, 'TaskList', _StringOEM2ANSI($sProcesses_List))
Func _StringOEM2ANSI($strText)
Local $sBuffer = DllStructCreate("char[" & StringLen($strText)+1 & "]")
Local $aRet = DllCall("User32.dll", "int", "OemToChar", "str", $strText, "ptr", DllStructGetPtr($sBuffer))
If Not IsArray($aRet) Then Return SetError(1, 0, '') ; ошибка DLL
If $aRet[0] = 0 Then Return SetError(2, $aRet[0], '') ; ошибка функции
Return DllStructGetData($sBuffer, 1)
EndFunc