Solved

Script for RDP auto login

Posted on 2010-09-13
4
3,340 Views
Last Modified: 2012-05-10
Hello Experts
I am looking for a script to auto login through RDP to a specific computer that will automatically login to this server with the proper username & password.
I tried it using a batch file: "nstsc.exe /v:{computer name}" but since I cannot send keys (user & password) on a batch file I was wondering if I could perform this task using a different script..VBScript maybe....??
Can you help...??
0
Comment
Question by:marmoor99
  • 2
4 Comments
 
LVL 2

Expert Comment

by:burdsjm
ID: 33663819
Depending on your RDP version you can usually use a command like

C:\windows\System32\mstsc.exe /v:computername /admin

when the screen pops up you can check the box that says remember username and password.

0
 

Author Comment

by:marmoor99
ID: 33666157
Thanks but, don't want it to login as an administrator so I dont need the /admin part...second when I run this script it opens a new RDP session and it does not give me the option to save the password...
It there any way to do this in VBScript? myabe send the username & password to the RDP session window?
0
 
LVL 2

Expert Comment

by:burdsjm
ID: 33668076
/admin is for the console in the new RDP.  I have it on a few machines and if you hit the options button at the bottom of the screen, it gives you a "Allow me to save credentials"  and it won't prompt you again for the username and password till you change it.
0
 
LVL 3

Accepted Solution

by:
biaselectronics earned 125 total points
ID: 34007979
We use an ASP file to generate the old form of RDP file, you may be able to modify it to present the .RDP file for the user to open or even open automatically

<%      Response.Contenttype="application/x-rdp"
      Response.AddHeader "content-disposition","attachment;filename=Remote.rdp"


%>
screen mode id:i:2
desktopwidth:i:1024
desktopheight:i:861
session bpp:i:8
winposstr:s:0,1,0,0,1000,740
full address:s:192.168.0.4
compression:i:1
keyboardhook:i:2
audiomode:i:0
redirectdrives:i:1
redirectprinters:i:1
redirectcomports:i:0
redirectsmartcards:i:1
displayconnectionbar:i:1
autoreconnection enabled:i:1
authentication level:i:0
username:s:
domain:s:DOMAINNAME
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:0
disable cursor setting:i:0
bitmapcachepersistenable:i:1
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Like many organizations, your foray into cloud computing may have started with an ancillary or security service, like email spam and virus protection. For some, the first or second step into the cloud was moving email off-premise. For others, a clou…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now