Вот пример на VBS (не совсем понятно чем это решение не устраивает)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "c:\dtr8x.cmd" & Chr(34), 0
Set WshShell = Nothing
Или вот относительно простое (но более функциональное) решение на Autoit:
#include <WinAPIProc.au3>
$aWin = winlist() ; получаем массив всех открытых окон
for $i=0 to Ubound($aWin) - 1
$hwnd = $aWin[$i][1]
$pid = WinGetProcess($hwnd) ; получаем PID процесса
$path = __WinAPI_GetProcessFileName($pid) ; получаем полный путь к exe
if StringInStr($path,"cmd.exe") then ; ищем нужный файл
consolewrite($path & @CRLF)
WinSetState($aWin[$i][1], "",@SW_HIDE)
ExitLoop
EndIf
next
Func _WinAPI_QueryFullProcessImageName($hProcess)
Local Const $PROCESS_NAME_NATIVE = 1
Local $dwSize = 65535
Local $aRet = DllCall("kernel32.dll", "BOOL", "QueryFullProcessImageName", "handle", $hProcess, "dword", 0, "str", "", "dword*", $dwSize)
Return $aRet[3]
EndFunc
Func __WinAPI_GetProcessFileName($PID = 0)
If Not $PID Then $PID = @AutoItPID
Local $hProcess = DllCall('kernel32.dll', 'handle', 'OpenProcess', 'dword', __Iif($__WINVER < 0x0600, 0x00000410, 0x00001010), _
'bool', 0, 'dword', $PID)
If @error Or Not $hProcess[0] Then Return SetError(@error + 20, @extended, '')
Local $Path = _WinAPI_QueryFullProcessImageName($hProcess[0])
Local $iError = @error
DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $hProcess[0])
If $iError Then Return SetError(@error, 0, '')
Return $Path
EndFunc ;==>_WinAPI_GetProcessFileName
Здесь есть нюанс, что у файла .cmd путь процесса будет C:\Windows\System32\cmd.exe
, а путь к вашем файлу будет в параметрах командной строки как cmd /c ""C:\dtr8x.cmd" "