Can we execute a Windows run command from an Android device? Like for example I want to open a file in PC using my Android device such as Run>C:\abc.exe.

Or you can say I want to run a batch process (Exe File) placed in PC from my Android device.

  • 2
    Why don't you try remote desktop?
    – roxan
    Commented Apr 11, 2012 at 13:25
  • Please don't just throw every version tag onto your questions. It is not the purpose of the tagging system. Commented Apr 11, 2012 at 13:27

2 Answers 2


One option would be to install and set up SSH on the target PC. http://sshwindows.sourceforge.net/

You can then use any of the many SSH android clients to connect to the target PC and you will have command line access.

  • 1
    This is a dangerous advice: SSH Windows is positively ancient (7 years since the latest release, for a critical piece of software) and unsupported. Better alternatives exist, and Wikipedia lists most of them. Commented Apr 11, 2012 at 14:40
  • Good point, if you want this to be accessible from outside your home network, you certainly should seek an up to date option.
    – Brandorf
    Commented Apr 11, 2012 at 15:12

I think we can achieve this thing using Sockets. we need to send a command from device to PC using socket. But on PC side we must have another socket which can manipulate the incomming command from device .Then we can execute exe batch or jar file on the basis of incomming string.

Like that suppose we send a command from device to pc " Java -jar " C:\deviceExecute.jar " On pc side we get this command through socket as a string (executejar) and then run this

if(executejar!=null || executejar!="") {

Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec(executejar);


  • 2
    Welcome to Android Enthusiasts! Note that this site is intended for Android (power) users, not programmers, so please only provide answers that do not involve creating your own program.
    – THelper
    Commented Feb 14, 2013 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .