How do I run a remote DOS command on a Win machine from a Linux box?

  • Thread starter Thread starter laredotornado
  • Start date Start date
L

laredotornado

Hi,

My remote machine is Win XP SP2 and I want to run a batch file command
on the Win machine from a Linux Ubuntu 11.04 server. What is the
easiest way to do that?

Thanks, - Dave
 
Hi,

My remote machine is Win XP SP2 and I want to run a batch file command
on the Win machine from a Linux Ubuntu 11.04 server. What is the
easiest way to do that?

Thanks, - Dave

If you can wait a bit for response, consider creating a scheduled task
in the Windows box with a batch file located on the Linux server that
you can manipulate or hide if you don't want it run. Otherwise, you're
looking at some type of remote desktop.
 
If you know a way to run Window's Console programs from a UNIX desktop,
then you can easily issue console commands to a remote Window's PC with
Sysinternal's "PS Tools" ....

http://download.sysinternals.com/Files/PsTools.zip

These tools were designed to issue a wide range of remote commands from one
Window's PC to one or more others. So it's just a matter of running such
tools on a UNIX platform - some sort of DOS-Box type environment.

==

Cheers, Tim Meddick, Peckham, London. :-)
 
Hi,

My remote machine is Win XP SP2 and I want to run a batch file command
on the Win machine from a Linux Ubuntu 11.04 server. What is the
easiest way to do that?

Thanks, - Dave

You would need to install Windows Services for Unix (SFU) and install
the Interix subsytem on the XP box.

John
 
You would need to install Windows Services for Unix (SFU) and install
the Interix subsytem on the XP box.

John

Thanks for the responses. To clarify, this is the type of task I
would want to run on demand or on a schedule, but in both cases, I
would need the Linux box to control task execution. Further, I would
also want this process to work with a Windows 7 machine. Given that,
is Windows services still the way to go? Or do I need to consider a
different approach per Windows OS?

Thanks, - Dave
 
Thanks for the responses. To clarify, this is the type of task I
would want to run on demand or on a schedule, but in both cases, I
would need the Linux box to control task execution. Further, I would
also want this process to work with a Windows 7 machine. Given that,
is Windows services still the way to go? Or do I need to consider a
different approach per Windows OS?

Thanks, - Dave

They call it "Subsystem for UNIX-based Applications" (SUA) on
Vista/Windows 7 and Server 2008. On the clients (Vista/Windows 7) it
only runs on the Enterprise and Ultimate versions. You might want to
ask the folks in the Linux groups for more help and advice, or try here:
http://www.suacommunity.com/Default.aspx

John
 
Thanks for the responses. To clarify, this is the type of task I
would want to run on demand or on a schedule, but in both cases, I
would need the Linux box to control task execution. Further, I would
also want this process to work with a Windows 7 machine. Given that,
is Windows services still the way to go? Or do I need to consider a
different approach per Windows OS?

Thanks, - Dave

If you only want to strictly run DOS commands and no UNIX
commands/utilities on the Windows box your don't need to go through the
Interix complications. You can use the Linux rdesktop Remote Desktop
Protocol (RDP) and take control of the Windows box from your Linux box,
but this doesn't lend itself very well to automated tasks. You could
also use Telnet instead of RDP. Another option would be to use
something like WINE that would be capable of running PsExec.

John
 
Back
Top