There should be underscore before T(): GetProjectManager().GetActiveProject().SetCommandsBeforeBuild(_T("cmd /c mkdir abc"));
Script console - app crash instead display error