mercredi 25 février 2015

RDP into a remote machine using .bat file, by clicking an additional OK button

I have read the other posts on using .bat files to RDP into a remote machine. I am able to do that, but I have a few additional steps I want to accomplish.


I am using mstsc to log into my remote machine with my credentials



cmdkey /generic:TERMSRV/$Server /user:$Domain\$User /pass:$Password
mstsc /v:$Server


However, once I login with my credentials, I have an additional step before the connection can be made. There is a Busines Use Notice page, where I need to click OK to complete the connection enter image description here




  1. Is there a way to automatically click this OK button by adding something to my .bat file? If not, is there another process I can use to automatically click this button?




  2. There is another step I would like to accomplish. Once I have made the connection, I would like to disconnect my remote session. I do not want to log out with my user, just disconnect the session (similar to clicking the close X)




Hopefully its possible to accomplish this, but maybe its not.


Aucun commentaire:

Enregistrer un commentaire