Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Simple Windows32 Question

by jarthda (Acolyte)
on Dec 14, 2007 at 23:02 UTC ( #657136=perlquestion: print w/ replies, xml ) Need Help??
jarthda has asked for the wisdom of the Perl Monks concerning the following question:

How do I make perl logon to a remote windows machine and run a cmd line?

Comment on Simple Windows32 Question
Re: Simple Windows32 Question
by shmem (Canon) on Dec 15, 2007 at 00:22 UTC
    You instruct it to do so, which generally includes writing a script for perl to read and execute.

    Obstacles encountered on the way are generally solved reading the documentation and using CPAN. A good understanding of TCP/IP is beneficial.

    See also: How (Not) To Ask A Question

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Simple Windows32 Question
by NetWallah (Abbot) on Dec 15, 2007 at 00:54 UTC
    Depending on how complex your task is, look into psexec, or the rcmd service that was with old resource kits. In the w2000 days, there was even a telnet service, not sure of current status.

    On the perl (controlling) side, if you get the telnet service enabled, you can use the Net::Telnet module, or use backticks for psexec or rcmd.

         "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

Re: Simple Windows32 Question
by Corion (Pope) on Dec 15, 2007 at 09:03 UTC

    You can also use the WMI (via Win32::WQL for example, written by me) to remotely launch a process. This will require that you have the appropriate privileges and that DCOM is not disabled in your network.

Re: Simple Windows32 Question
by strat (Canon) on Dec 15, 2007 at 10:23 UTC

    As a lowlevel way, you can also add something to the remote scheduler with the command:

    at \\nodename ....

    (see: help at for more information

    If you have problems with the parameters, there exists a freeware program with name WinAt (you can easily find it with google

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://657136]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-09-20 21:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls