Running remote commands on Windows

F

Filipe Bonjour

Hi,

I'm writing a series of scripts to be run on a Windows 2000 server to
control applications on a series of other Windows servers.

Most commands to control the application are network-transparent. But we
still need to launch from the controlling server some commands on the
running servers. For instance we need to run tlist.exe to gather
information on processes running remotely.

I tried to find both generic modules for launching commands remotely (e.g.
Net::Rsh) or more specific modules (e.g. Win32::process) but I haven't
found anything 100% satisfactory. I also thought of building a small
daemon running on the remote servers that would accepts requests, run
tlist.exe and return the reply. (I was thinking Net::Daemon, because I
don't know enough about Windows to write a server in C).

Any thoughts would be appreciated!

TIA,

Filipe
 
A

! aaa

Win32::OLE and Win32::API are nice.

perl can launch commands natively - system() - so you don't need anything
else really.

Here's how API does it tho:-

$Shellex = new Win32::API("shell32", "ShellExecute",
['N','P','P','P','P','N'], 'I');
my $result = $Shellex->Call( $handle, $operation, $file, $params, $dir,
$show);
return $result > 32;

See MSDN for the SHellExecute FN doco.
 
D

Domenico Discepola

Filipe Bonjour said:
Hi,

I'm writing a series of scripts to be run on a Windows 2000 server to
control applications on a series of other Windows servers.

So am I (or trying to)...
I tried to find both generic modules for launching commands remotely (e.g.
Net::Rsh) or more specific modules (e.g. Win32::process) but I haven't
found anything 100% satisfactory. I also thought of building a small
daemon running on the remote servers that would accepts requests, run
tlist.exe and return the reply. (I was thinking Net::Daemon, because I
don't know enough about Windows to write a server in C).

The only application I found was psexec.exe available from sysinternals. I
would prefer a complete Perl solution (without a system call to an external
program like psexec, or having to install telnet or ssh servers). Please
update us on the newsgroup if you have found something.

Regards,

Domenico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top