topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday October 9, 2024, 7:59 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY  (Read 10127 times)

sabio

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY
« on: July 29, 2008, 11:40 AM »
Just be able to turn the caps on/off for a remote computer.

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY
« Reply #1 on: July 29, 2008, 02:39 PM »
Hmm... quite an interesting request. I'm sure there'll be better solutions and this one might be quite dumb, but start this Autohotkey script on the computer and remotely create a blank file called "CapsLockOn" or "CapsLockOff" to enable/disable Caps Lock. (Use "SetCapsLockState,AlwaysOn" or "SetCapsLockState,AlwaysOff" if you don't want to force the CapsLock state.)

;#NoTrayIcon
#persistent

SetTimer, CapsLock, 1000
return

CapsLock:
IfExist,C:\CapsLockOn
{
FileDelete,C:\CapslockOn
SetCapsLockState,On
}

IfExist,C:\CapsLockOff
{
FileDelete,C:\CapslockOff
SetCapsLockState,Off
}

sabio

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY
« Reply #2 on: July 30, 2008, 10:34 AM »
That's interesting, however, I was thinking more like a simple command line executable (e.g. CapLock \\<computer_name> /off OR /on

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY
« Reply #3 on: July 30, 2008, 04:20 PM »
I thought so, but this is something I can't do.

But a very small Autohotkey script together with PsExec can do it. :)
(See attachment)

Create a shortcut or run it this way:
psexec \\{Computername} -u {username} -p {password} -d -c -v -i SetCapslock.exe {On|Off|AlwaysOn|AlwaysOff}

Example:
psexec \\Moya -u Aeryn -p Sun -d -c -v -i SetCapslock.exe On

Example #2 (if you want the console window to stay open)
cmd.exe /k psexec.exe \\Moya -u Aeryn -p Sun -d -c -v -i SetCapslock.exe On

Please let me know if this works. Can't really test it here on a single computer.... but if it works, it could be quite a prank tool (just send ...SetCapslock.exe AlwaysOn) *g*


Psexec:
http://technet.micro...ernals/bb897553.aspx

Used AHK script:
#NoTrayIcon
#SingleInstance force
if 1 <>
SetCapsLockState,%1%
If 1 contains Always ; Anti Prank
Menu,Tray,Icon
« Last Edit: July 31, 2008, 03:29 AM by wr975 »

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY
« Reply #4 on: July 31, 2008, 03:16 AM »
Tested it at work to remotely change a Windows2000 and Windows Vista system. "psexec" needed some more parameters, especially the "-i" one, but it works. Now wrap a GUI around it and you've an own application. :)

psexec parameters:
-u Username
-p Password
-d Don't wait for application to terminate
-c Copy program to remote system
-v Don't copy if same version already present
-i Run as desktop application on remote system