Click here to Skip to main content
15,745,178 members
Articles / Programming Languages / C#
Posted 27 Aug 2007


26 bookmarked


Rate me:
Please Sign up or sign in to vote.
3.20/5 (2 votes)
27 Aug 2007CPOL2 min read
Remote console allows to send commands to a remote computer located on the Internet


Sometime ago, I had to install a Windows service on a computer, located outside of our network, that downloads and prints different documents. This service had to be up 24/7 but the printing process had a lot of problems which stopped this critical service time and again. Even if I fix some problems and the application becomes more stable, I understand that it is necessary to have a control on that service. A simple and flexible solution was to create a remote console which allows to send console commands from my computer to a remote computer.

With net start/stop "myService" I can start/stop my service and with net start I can check if my service is up. The nice part of this solution is that if you want new functionalities later, you can write an EXE, copy on the client side and launch from remote console.


To be very flexible, I decided to use webservices for communication and I built other two applications. One of them, RemoteAdmin, has to be installed on the client side and RemoteControl will be on your side. The flow is quite simple. RemoteAdmin checks the webservice every five seconds for new commands. If it finds something to do, it will execute the command and will return the output to the webservice. RemoteControl will check every five seconds if there is new output from the clients and at the same time can send commands to the webservice. The webservice acts like a small storage for both parts. It keeps a list with all computer's current commands and current outputs.

Install the Application

To install the application:

  1. Create a virtual directory called RemoteAdmin. Set this directory to point to the RemoteAdminWebService folder:

Screenshot - 3.jpg

  1. Install the RemoteAdmin using RemoteAdminSrv.exe from Setup folder (this binary will connect to localhost\RemoteAdminWebService). You can also use the batch files to install manually.
  2. Launch RemoteControl and in the white area, type console commands like ipconfig /all.

Using RemoteConsole

The left panel will show all RemoteAdmin clients connected to the webservice. From here, you can also select a computer.

In the black area, you can see the console output of the selected computer.

From the white area, you can send the commands to the selected computer.

The result after command ipconfig /all is as shown below:

Screenshot - 4.jpg

The output after command net start is as shown below:

Screenshot - 5.jpg


  • 28th August, 2007: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

GeneralYou could just use services.msc and connect to remote computer Pin
Hal Angseesing28-Aug-07 5:39
professionalHal Angseesing28-Aug-07 5:39 
GeneralRe: You could just use services.msc and connect to remote computer Pin
Maze28-Aug-07 6:48
Maze28-Aug-07 6:48 
GeneralRe: You could just use services.msc and connect to remote computer Pin
Hal Angseesing29-Aug-07 0:23
professionalHal Angseesing29-Aug-07 0:23 
GeneralGood Article Pin
merlin98128-Aug-07 4:40
professionalmerlin98128-Aug-07 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.