1

I've got this script in a batch file:

cmdkey /generic:"servername" /user:"user id" /pass:"password"
mstsc /v:"servername"

...which logs me into a remote server (remote desktop session). It works great, but doesn't actually log me in all of the way because this server is configured with an interactive logon, meaning there is a message that comes up that I have to click OK to when I first connect before it actually signs in all of the way.

We have a problem with our admins shutting down this server at night to apply updates and thus logging us out - causing our scheduled tasks to not refresh. I want to assign this batch file to a scheduled task on my local PC to ensure that every morning, before my scripts run, I'm logged back into the server.

Is there a way to get this batch file to bypass/acknoweldge this message so it finishes signing me in?

Mark
  • 3,609
  • 1
  • 22
  • 33
user3108489
  • 363
  • 1
  • 4
  • 15
  • Why not simply change your scheduled tasks so that they run whether the user is logged in or not? – Mark Dec 17 '13 at 23:17

0 Answers0