Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

Terminal Tool

Stephen_Hibbert__Int
Principiante
2.293 Vistas

I'm trying to create a Terminal Tool similar to the onein Commander.Ireally just want to be able to send commands to the agent running on the OS (ie. "exec notepad"). This may be a very broad question, but how would I go about doing this? I tried looking through Commander's source code, but I'm not even sure where to look.

0 kudos
1 Solución
Brett_M_Intel
Empleados
2.293 Vistas
If you want to understand the interaction between the Manageability Commander Tool and the Manageability Outpost Tool, from a programmatic perspective, then I recommend you review the following source code files:
  • Manageability ControlsProcessMonitorForm.cs : startButton_Click method -- Basically just sends a plain text string that contains the "EXEC" command (as understood by the Outpost tool) and a program executable name (including path if not found in the standard system path on the target system's OS).
  • Manageability Outpost ToolAmtSerialAgent.cs : ProcessDataBlockHandler method -- Look for the "if" statement that handles any "exec" commands. This is how the remote agent receives the commands to execute a local process. It attempts to create a local process for the given application executable.

- Brett McKown
Senior Software Engineer
Intel Digial Enterprise Group, Digital Office Platform Division

Ver la solución en mensaje original publicado

5 Respuestas
Brett_M_Intel
Empleados
2.294 Vistas
If you want to understand the interaction between the Manageability Commander Tool and the Manageability Outpost Tool, from a programmatic perspective, then I recommend you review the following source code files:
  • Manageability ControlsProcessMonitorForm.cs : startButton_Click method -- Basically just sends a plain text string that contains the "EXEC" command (as understood by the Outpost tool) and a program executable name (including path if not found in the standard system path on the target system's OS).
  • Manageability Outpost ToolAmtSerialAgent.cs : ProcessDataBlockHandler method -- Look for the "if" statement that handles any "exec" commands. This is how the remote agent receives the commands to execute a local process. It attempts to create a local process for the given application executable.

- Brett McKown
Senior Software Engineer
Intel Digial Enterprise Group, Digital Office Platform Division

Stephen_Hibbert__Int
Principiante
2.293 Vistas
If you want to understand the interaction between the Manageability Commander Tool and the Manageability Outpost Tool, from a programmatic perspective, then I recommend you review the following source code files:
  • Manageability ControlsProcessMonitorForm.cs : startButton_Click method -- Basically just sends a plain text string that contains the "EXEC" command (as understood by the Outpost tool) and a program executable name (including path if not found in the standard system path on the target system's OS).
  • Manageability Outpost ToolAmtSerialAgent.cs : ProcessDataBlockHandler method -- Look for the "if" statement that handles any "exec" commands. This is how the remote agent receives the commands to execute a local process. It attempts to create a local process for the given application executable.

- Brett McKown
Senior Software Engineer
Intel Digial Enterprise Group, Digital Office Platform Division


EXACTLY what I was looking for. Thanks!
Maria_Camila_Gomez-S
Principiante
2.293 Vistas
If you want to understand the interaction between the Manageability Commander Tool and the Manageability Outpost Tool, from a programmatic perspective, then I recommend you review the following source code files:
  • Manageability ControlsProcessMonitorForm.cs : startButton_Click method -- Basically just sends a plain text string that contains the "EXEC" command (as understood by the Outpost tool) and a program executable name (including path if not found in the standard system path on the target system's OS).
  • Manageability Outpost ToolAmtSerialAgent.cs : ProcessDataBlockHandler method -- Look for the "if" statement that handles any "exec" commands. This is how the remote agent receives the commands to execute a local process. It attempts to create a local process for the given application executable.

- Brett McKown
Senior Software Engineer
Intel Digial Enterprise Group, Digital Office Platform Division


Brett
So.. in order to get the "exec" command executed in the AMT machine you need to have OutPost installed in the local AMT Machine?
Ashish_Chauhan
Principiante
2.294 Vistas

Brett
So.. in order to get the "exec" command executed in the AMT machine you need to have OutPost installed in the local AMT Machine?

Yes :)



@Brett
So where can i find the same source code files in C++ ??
Brett_M_Intel
Empleados
2.293 Vistas
@Ashish,

Unfortunately, the Manageability Developer Tool Kit is primarily only written in C#/.NET and this code sample isn't directly available in C++. However, you can look at the native C++ samples provided in the Intel AMT SDK, specifically the IMRGUI application (WindowsIntel_AMTSamplesRedirectionIMRGUI folder in the SDK download from this website).

Basically, with the Intel Redirection Library (imrsdk.dll) you're sending/receiving plain text strings via the IMR_SOLSendText and IMR_SOLReceiveText functions. Follow the basic flow for establishing a SOL session with a client Intel AMT system and then you can perform this simple task of sending an "exec" command to your custom Outpost-like client application or service. The client application/service would then create a new process to fulfill that "exec" command via the CreateProcess function (Win32 function call).

Review the "Redirection Library Design Guide" in the Intel AMT SDK documentation folder and the sections for a "Typical SOL Scenario" and the "Functions for SOL Handling" to get a better understanding of how to accomplish this via native software development in C/C++.

And please feel free to follow-up with additional questions if you need further assistance.

- Brett McKown
Senior Software Engineer
Intel Digital Enterprise Group, Digital Office Platform Division
Responder