Solved

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

Posted on 2012-04-03
2
652 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…

752 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