Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Running exe's remotely

by zakb (Pilgrim)
on Jan 30, 2003 at 16:17 UTC ( #231360=note: print w/replies, xml ) Need Help??

in reply to Running exe's remotely

All your combination of chdir's and system's is doing is running the executable from the network on your machine.

You need to use something like telnet (Net::Telnet?) to log in to the remote machine and run the executable on that machine. Of course, you'll need a telnet server on the Win2k machine.

Replies are listed 'Best First'.
Re: Re: Running exe's remotely
by Anonymous Monk on Jan 31, 2003 at 11:31 UTC
    I use a Workstation module I wrote myself. one of the subs returns a WMI handle...

    sub get_wmi {
            my $self = shift;
            my $name = $self->name or do { 
                    warn("Cannot return WMI handle for anonymous workstation.\n");
                    return 0; 
            use Win32::OLE ;
            my $wmi = Win32::OLE->GetObject( "winmgmts:{impersonationLevel=impersonate,(security)}//$name");
            if ($wmi) {
                  return $wmi;        
                  return 0;
    You should then be able to do $wmi->CreateProcess("your.exe") or whatever (see for details of WMI)...

    Or Google for "perl+WMI" - or visit

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://231360]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-11-30 04:03 GMT
Find Nodes?
    Voting Booth?