Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,

I am trying to build a program that would run an executable on a remote computer.

But basically i want to be able to login and then run a file on the C drive of the remote PC. I was hoping there some sort of support in the .NET that allows me to use RDP to do this.
I am trying to avoid writing a SERVER side program. That why i want to use RDP because then I could just connect how windows RDP connect and then write code to run a file remote pc.

Any help would be nice
Posted
Updated 13-May-11 20:57pm
v2

One way could be to start a remote process using WMI - see Create a Remote Process using WMI in C#[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 14-May-11 15:35pm    
Good link, my 5.
--SA
Abhinav S 15-May-11 1:13am    
Thank you SA.
You can launch processes on remote PC's, but you cannot launch an INTERACTIVE process, but only if the account YOUR code impersonates an admin account on the remote PC. The user that is logged onto the remote PC will never see any kind of user interface the remote program may put up. If it does, the app will just sit there waiting for response that will never come.

Remote Desktop requires more permissions on the remote machine that no account has default access to. The account you connect to the remote PC with has to be a member of the Remote Desktop Users group on the remote PC. Even then, you cannot remote desktop into a machine without kicking off the user that logged in on it.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 14-May-11 15:34pm    
Good points, my 5.
--SA
Member 11229327 13-Nov-14 22:08pm    
Can you please provide an example code ?
Dave Kreskowiak 13-Nov-14 23:09pm    
All you had to do was look at solution #1 and there's a link to an example.
You Can Use Ps-Tools !
a powerful fully parametric approved executeable !
could be Downloaded Right here :
PsTools - Windows Sysinternals | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900