Run program on remote machine after connecting with Remote Desktop
I am using the following code to establish a connection to a Microsoft Remote Desktop. I would like to modify this code somehow so that once the connection is made, I want a specific file to run on the remote machine. How do I do that? Here is the code that connects to RDP:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "C:\Tunnel.exe -load OPTC -pw password"
objShell.Run "mstsc /v: localhost:10001 /console /f"