Solved

Detect if a 2008R2 Remote Desktop user has caps lock on or off in vbscript

Posted on 2012-04-03
2
651 Views
Last Modified: 2012-04-03
I have scripts that read an ini file and sendkeys for user id and password to open programs.  The data in the ini file is uppercase, but when I use sendkeys it only works if the user does not have caps lock on.  i.e.  it reads BFANGUY from the ini file, but if i have my caps lock on, the script sends bfanguy to the login screen.  This behavior did not happen on 2003R2 terminal server.

I am guessing I need to check to see if the user has caps lock on, turn it off, sendkeys, then turn it back on.

any help would be greatly appreciated.
0
Comment
Question by:BFanguy
2 Comments
 
LVL 31

Accepted Solution

by:
Justin Owens earned 500 total points
ID: 37802500
Well, rather than detect, why not just script it to be off regardless?  That is much easier to code:

http://www.computing.net/answers/programming/command-turn-onoff-capslock-key-in-bat-file/21542.html

Look in the first half of the included script (before the BATCHSCRIPT). The second half was on how to make a batch file run the vbscript code in the first half.

DrUltima
0
 

Author Closing Comment

by:BFanguy
ID: 37803292
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

820 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