Processes and shell

Navigation:  Client commands > Tools > Client command editor > Command list >

Processes and shell

Version 1.0.0

Show hidden text

hmtoggle_arrow1Execute batch file command

With this command you can issue commands as a batch file. Simply enter the commands accoring to their syntax in the text field in the Details tab. Of course, you can also copy the contents of an existing batch file and paste it here.

 

hmtoggle_arrow1Shell execute command

With this command it is possible for you to select a program from the client. To do this, under the Details tab the file name of the program to be called, as well as its parameters. The program lets you select using the Browse button, if it is also installed on the local machine. Fill in the working dir.

 

Hinweis

Note:

It is recommended to use the absolute path for the "Filename". The programm in "Filename" uses "Working DIR" to run. It is recommended to use the relative path for "Working DIR".

 

5.8.3.2.22 - ShellExecuteCommand

Shell execute command

 

In the "Wait options" section, you can choose between two options. When "Wait for process" is checked the command will delay untill the process of the selected program is terminated. By choosing "Wait for another process" you have to enter another process. The command delay until the entered process is terminated.

 

In "Advanced Option", the 'call string' is shown in the disabled input field. This string initiates the indicated program with the specified parameters. If you still want to add something to the call string, unlock the call string and change it as required. Alternatively, a string is already stored, which calls the specified program from the command input of Windows (cmd.exe). ?!FileName!? and ?!Parameters!? contain the specified program (file name) and the parameters.

 

Hinweis

Note:

The call string is always used, regardless of whether it is locked or not.

 

Finally specify two variables (see Variables). In the first, the process ID is stored while in the second variable, the exit code is stored. The exit code in this case indicates whether the program was executed properly or if there were errors.

 

Under the tab "connection", you can use a different user if the local client user does not have the necessary rights to access the program. Activate the checkbox and enter the user name and the corresponding password.

 

Under the tab "Run as" you can run the program as a different user if the local client user does not have the necessary rights. Activate the checkbox and enter the user name and the corresponding password.

 

hmtoggle_arrow1Execute PowerShell script

With this command it is possible for you to run a PowerShell script. This, you enter the Details tab the equivalent commands in the text area or can copy this from an already existing script.

 

If within the script dialogues are shown it has to be impersonate perform. The performance runs on the system context and ins't shown for the logged user.

 

The checkbox "" enables the powershell console. This is important, when you need to show any dialogues.

 

Then enter two variables (see Variables). The first variable saves the exit code, which can be used to provide guidance for execution. By default, the exit code of each script is 0, unless this code has not been changed by the developer of the script. The second variable stores the outputs of the script.

 

Hinweis

Note

The script overwrites the value of the output variable, even if the script has no output or outputs only an empty string.

 

hmtoggle_arrow1Get process ID

With this command you can get the process ID of a particular process. For this purpose, you can specify in the Details tab a file name or a process, for which you are looking. The corresponding Browse button opens a window in which you can either  select a file (like a normal selection dialog) or a currently running process.

 

5.8.3.2.22 - GetProcessID

 

Based on this selection, a search is performed on the client according to a corresponding process, and the ID is returned. A variable you have to enter is used to store the ID (see Variables).

 

hmtoggle_arrow1Kill process

With this command, you can terminate a process immediately by entering a file name, a process or the corresponding PID (process ID) in the Details tab. With the two Browse buttons, you can select a file or a process. In the file selection, a selection dialog is opened to select a file. The process on which this file is based is terminated later. When selecting a process, all currently running processes are listed in a dialog. Same processes are terminated later.

 

However, some processes can not just quit. The Force kill for services and debugged applications option is useful in this connection. If more than one process exists (e.g., svchost.exe), an error will continue to be issued.

 

hmtoggle_arrow1Wait for process

With this command you can wait for the completion of a process To do this, enter in the Details tab a file name, a process, or the corresponding PID (process ID). With the two Browse buttons, you can select a file or a process. In the file selection, a selection dialog is opened to select a file. The process on which this file is based is waited for later. When selecting a process, all currently running processes are listed in a dialog. Same processes are waited for later. If more than one process exists (e.g., svchost.exe), an error will continue to be issued.

 

If a process requires a longer wait than the time (in seconds) set in Terminate, the command fails and cancels.

Last change on 02.12.2014