Page 1 of 1

Batch file to load remote desktop

Posted: 22 Jun 2022 07:26
by boomboom
Hi,

I am looking for help creating a batch file to open a remote desktop and enter in the username/password so all that needs to be done is click on the file.

Here is what i have so far...

@echo off
:A
cls
echo Remote DESKTOP
set /p n=Computername:"192.168.0.25"
mstsc -v %n%

Re: Batch file to load remote desktop

Posted: 23 Jun 2022 10:15
by aGerman
A quick internet search revealed something like that:

Code: Select all

cmdkey /generic:TERMSRV/<server> /user:"<domain\user>" /pass:"<password>"
mstsc /v:<server>
Terms in angle brackets are placeholders for your custom values.

Steffen