I'm not familiar with Visual Basic and its functions, but using C and pure API, I would do something like:
DWORD dwReturnCode = 0;
PROCESS_INFORMATION ProcessInfo;
if (CreateProcess(NULL, ashCmd_full_command_line, ...., &ProcessInfo))
{
WaitForSingleObject(ProcessInfo.hProcess, ...);
GetExitCodeProcess(ProcessInfo.hProcess, &dwReturnCode);
CloseHandle(ProcessInfo.hProcess); CloseHandle(ProcessInfo.hThread);
};
ashCmd.exe also supports "silent mode" - you can specify the requested actions by command-line arguments.