You have to deploy the application to your RaspBerry Pi first (see
Deploying an App with Visual Studio - Windows IoT | Microsoft Docs[
^]).
To start the application remotely, you have to remotely login on the Pi using a method that allows executing commands like with SSH.
With Windows, you can use the
plink command line tool which is part of
Download PuTTY - a free SSH and telnet client for Windows[
^] (untested):
plink -ssh -pw <passwd> <user>@<pi_ip_addr> "<path_to_app_on_pi> <parameters>" > log.txt
That will also write the console output of the application to the file
log.txt.
To implement error checking for
plink, put the above command in a batch file and access
%errorlevel%
.
To get the return value of the application you have to print that out on the Pi so that it is appended to
log.txt. To do this put the application execution and echoing of the return code into a script on the Pi and execute that via
plink.