Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

How to execute commands on remote desktop connection?

by pradeep,krishna (Scribe)
on Apr 04, 2014 at 05:41 UTC ( #1081065=perlquestion: print w/ replies, xml ) Need Help??
pradeep,krishna has asked for the wisdom of the Perl Monks concerning the following question:

Hi fellow monks.
I am using Win32::GuiTest module and mstsc.exe for remote desktop connection.
My Automation job is to keep the user logged into the system. So I have to close the RDC window. I used the method Win32::GUIRobot qw(CloseWindow); but , for that it is popping up an alert message. To eradicate it I want to execute the command tsdiscon on that RDC.
The problem is I don't know how to execute commands on RDC.
Help me on this
Thanks in advance.

Comment on How to execute commands on remote desktop connection?
Re: How to execute commands on remote desktop connection?
by Anonymous Monk on Apr 04, 2014 at 06:38 UTC

    The problem is I don't know how to execute commands on RDC.

    Sorry but you're not going to find the answer on perlmonks

    Win32 knowledge lives on MSDN

    I believe what bulk88 said in How to set text to text boxes? -- flat pixels aren't windows you can send messages to, they're flat pixels -- you're going to have to run a program on the remote desktop to control the remote desktop by sending messages to windows/dialogs...

Re: How to execute commands on remote desktop connection?
by dasgar (Deacon) on Apr 04, 2014 at 13:41 UTC

    Since you're on Windows, I'd recommend looking into using psexec, which is part of the Sysinternals set of tools. From your Perl code, you would use system to call psexec.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-08-23 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls