ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA - Tool For Turning CAPS LOCK On/Off - REMOTELY

(1/1)

sabio:
Just be able to turn the caps on/off for a remote computer.

wr975:
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:
That's interesting, however, I was thinking more like a simple command line executable (e.g. CapLock \\<computer_name> /off OR /on

wr975:
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.microsoft.com/en-us/sysinternals/bb897553.aspx

Used AHK script:

--- ---#NoTrayIcon
#SingleInstance force
if 1 <>
SetCapsLockState,%1%
If 1 contains Always ; Anti Prank
Menu,Tray,Icon

wr975:
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

Navigation

[0] Message Index

Go to full version