/ Sign-up
Your question

Rdp, connects a specifi user

  • Programming
  • C#
  • Command Line
  • Apps
Last response: in Apps General Discussion
April 21, 2010 4:19:00 PM


I want to write a c# program that runs a loop 5 times.

In that loop there will be the cmd

mstsc.exe <user> <password> <starting function>

meaning connecting 5 remote sessions and fire up a starting function in each of them as specified.

I couldn't see such an option in the mstsc.exe (init rdp from the command line) syntax

Does someone know how to do it?

More about : rdp connects specifi user

April 22, 2010 5:31:45 PM

I don't think it is possible because people would do something like this:
  1. open PASS_FILE,"<", "passwords.txt" or die $!;
  2. $passwd = <PASS_FILE>;
  3. $loopy = @passwd
  4. for($i=0; $i<$loopy; $i++) {
  5. system("mstsc.exe Administrator $passwd[$i]);
  6. }

It can be done with Automate, though.

P.S. Sorry, I suck at PERL so please forgive all the errors in example.