Click here to Skip to main content
Click here to Skip to main content
Go to top

RemoteConsole

, 27 Aug 2007
Rate this:
Please Sign up or sign in to vote.
Remote console allows to send commands to a remote computer located on the Internet

Introduction

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.

Background

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

History

  • 28th August, 2007: Initial post

License

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

Share

About the Author

Maze
Software Developer
Romania Romania
No Biography provided

Comments and Discussions

 
GeneralYou could just use services.msc and connect to remote computer PinmemberHal Angseesing28-Aug-07 5:39 
GeneralRe: You could just use services.msc and connect to remote computer PinmemberMaze28-Aug-07 6:48 
GeneralRe: You could just use services.msc and connect to remote computer PinmemberHal Angseesing29-Aug-07 0:23 
GeneralGood Article Pinmembermerlin98128-Aug-07 4:40 
Thanks for sharing
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I get my developer tools from Merlin A.I. Soft

Rhabot - World of Warcraft Bot

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 28 Aug 2007
Article Copyright 2007 by Maze
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid