Share this page 

Turn Capslock On/OffTag(s): WSH VBScript


You need to have Office Word installed. Word.Application is used by this VBS to query the CAPS state. If CAPS is ON, then we turn it off.
Set objShell = CreateObject("WScript.Shell")
Set objWord = CreateObject( "Word.Application" )

if objWord.CapsLock <> 0 then
   ' turn capslock off
   objShell.SendKeys "{capslock}"
end if
objWord.Quit
To use from a batch file see this HowTo.