Batch file to load remote desktop

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
boomboom
Posts: 1
Joined: 22 Jun 2022 04:30

Batch file to load remote desktop

#1 Post by boomboom » 22 Jun 2022 07:26

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%

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Batch file to load remote desktop

#2 Post by aGerman » 23 Jun 2022 10:15

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

Post Reply