http://www.perlmonks.org?node_id=994267


in reply to Re: How to execute windows dos command using perl and how to login to another windows machine and execute dos command in that
in thread How to execute windows dos command using perl and how to login to another windows machine and execute dos command in that

Hi BrowserUk,

already we are using some external tools.

our need is to perform operation without using any external tools.

so it would be better if you tell any other way in perl, or some perl modules, etc...

thank you...

  • Comment on Re^2: How to execute windows dos command using perl and how to login to another windows machine and execute dos command in that

Replies are listed 'Best First'.
Re^3: How to execute windows dos command using perl and how to login to another windows machine and execute dos command in that
by dasgar (Priest) on Sep 18, 2012 at 18:57 UTC

    I'm not sure what your definition is of "external tools". Psexec is part of the Sysinternals suite of tools that is now owned by Microsoft. These tools are simply an executable that you download (for free) and use on your Windows system. My personal view is to consider the Sysinternals tools as "native" tools that just are not shipped with the OS.

    For your desired task of using one Windows system to remotely run a command on another Windows system, I personally agree with BrowserUk that psexec will be the easiest method available.

Re^3: How to execute windows dos command using perl and how to login to another windows machine and execute dos command in that
by Divakar (Sexton) on Sep 25, 2012 at 08:02 UTC
    thanks for the help. now i can able to execute. but i face some issues. any idea.
    C:\>psexec \\vm-ntdivakar2 cleartool mount -all
    it returned error code.
    \ui is already mounted. \wpg is already mounted. cleartool exited on vm-ntdivakar2 with error code 1.
    So i got full pathname from the remote machine.
    C:\>psexec \\vm-ntdivakar2 which cleartool PsExec v1.98 - Execute processes remotely Copyright (C) 2001-2010 Mark Russinovich Sysinternals - www.sysinternals.com C:\Program Files (x86)\Rational\ClearCase\Bin/cleartool.exe which exited on vm-ntdivakar2 with error code 0.
    Then executed. but still it is returning error code.
    C:\>psexec \\vm-ntdivakar2 "C:\Program Files (x86)\Rational\ClearCase\ +Bin/cleartool.exe" mount -all \ui is already mounted. \wpg is already mounted. C:\Program Files (x86)\Rational\ClearCase\Bin/cleartool.exe exited on +vm-ntdivakar2 with error code 1.