Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Sep 18, 2012 at 10:37 UTC ( [id://994254]=note: print w/replies, xml ) Need Help??


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

how to login to another windows machine and execute dos commands in that?

See PsExec for the easy way.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

div
  • Comment on Re: 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^2: 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 18, 2012 at 11:59 UTC

    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...

      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.

      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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-25 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found