Kill application on Toradex Colibri VF61 from a Windows Computer

Hello,

I would like to close an .NET CF 3.5 application running on the Toradex Module remotely from my PC. I tried using taskkill, but I just get an error “RPC Service isn’t available”. What would be the correct way to kill an application running on an WEC device.

Thank you.

Niraj

Dear @Niraj

To use RPC, you need to have an Windows Mobile Device Center connection (it used to be ActiveSync in older Windows Desktop versions) over USB.

taskkill is not appropriate to communicate with a WinCe device.

The only proper way I see is:

  1. Write a command line application for WinCe which kills the application.
    Let’s call this application niraj_kill.exe

  2. Copy this application onto your target device.
    For example into the folder \Flashdisk

  3. Download “Windows Mobile Developer Power Toys” and install them on your PC

  4. In the Powertoys installation folder, you will find a folder RAPI_Start, which contains a tool rapistart.exe

  5. With rapistart you can remote start any random application. To kill your application, enter the following command on your PC:

    rapistart \Flashdisk\niraj_kill.exe
    

I don’t know your reasoning for wanting to remotely kill this application. Maybe a general remote access to your device would be preferable? There’s the Remote Display feature, which allows you to see the full desktop of the target device and interact with it using the PC mouse and keyboard.
This option is not limited to ActiveSync, but there is only an Ethernet version available.

Regards, Andy

Thank you @andy.tx for the answer.

Unfortunately, we only have an Ethernet connection to the device. The reason behind having to close the application from a PC is remote deployment of new software versions. We can remote in to a PC which is connected to the WinCE device.

I have used the Remote Display feature, and it works great. However, when our application is running on the device, it takes the foreground, hiding the WinCE taskbar, so can’t access anything but our application. The challenge will be to close without access to OS keys/buttons.

It would have been more helpful if it was possible to invoke the batch file to kill the process over Ethernet.

Thanks again!

Best,
Niraj

Dear @Niraj

Your task can be split up in two parts:

  1. Write a local application which can kill your main application.
    To keep the same example as in my first answer, let’s still call this application niraj_kill.exe
  2. How to start the application niraj_kill.exe

If I got you right part 1 is not an issue, so let’s focus on part 2. There are multiple options:

  • If you have access to a USB port or SD card socket, and didn’t disable the AutoRun feature, you can simply create a folder \AutoRun on a USB drive or SD card, and copy niraj_kill.exe into this folder.
    When you connect this storage to your device, niraj_kill.exe will be automatically executed.
  • You can activate Telnet on your device. Please refer to the following article for details:

Once you have configured it, you can remotely login into your device and start niraj_kill.exe from the command line.

These two solutions are simple to setup, but open security holes in your device - any application can be executed this way. However, it can be done better:

The Colibri side can then execute niraj_kill.exe once it was told so by the PC side of your application.

With this approach you can define your own simple protocol, and your Colibri side of the application defines which commands can be executed at all - possibly only niraj_kill.exe.

Regards, Andy

@andy.tx
Thank you for your response and the suggested workarounds. I was able to achieve what I needed with the Telnet option.

Thank you again!