Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-04-03
2
Medium Priority
?
660 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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

A safe way to clean winsxs folder from your windows server 2008 R2 editions
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

704 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