Solved

Script for RDP auto login

Posted on 2010-09-13
4
3,494 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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 shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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