Is there any way to disable the Windows/Start Menu key via Macro Scheduler? And then re-enable it?
I know that there are a couple of registry tweaks that will do it, but it requires a reboot to activate.
Here's what I'm trying to accomplish: After a user logs into the computer, a special application runs from the Startup folder that covers the entire screen and requires input from the user. Until the user inputs their information they cannot use the computer. Problem is, the Windows key still works and therefore they have access to everything in the Start Menu. I want to be able to disable the Windows key until they have entered their info.
Any ideas?
Thank you!
Disable/Enable Windows key on the fly w/no reboot?
Moderators: Dorian (MJT support), JRL
This won't make the winkeys non-functional but it will make them unusable. Use Onevent>KEY_DOWN,VK91 and VK92. The left and right winkey codes. When the user presses a winkey the menu pops up but the subroutine called by onevent immediately presses esc 30 times (or however many times you need to press it). The number of times isn't important as long as its enough to catch the menu and close it. Really only one well timed esc press is needed. This will stop the winkey from being used but what about ctrl+exc or alt+tab or alt+f4 or other hot keys the user could set up? We can't interupt key presses but we can similarly deal with their results. Have fun.
Sample:
Sample:
Code: Select all
OnEvent>KEY_DOWN,VK91,0,WinKey
OnEvent>KEY_DOWN,VK92,0,WinKey
SRT>WinKey
Let>kk=0
Repeat>kk
Add>kk,1
Release LWinKey
Release LWinKey
Press Esc
Wait>0.01
Until>kk,30
END>WinKey
Label>loop
wait>0.01
goto>loop
That worked!! Thanks
I almost have this thing the way I want but it's not quite right. Here's what I have now:
After the user logs into Complab, that program minimizes itself. At that point. i want the script to stop, so that the user has access to the Windows keys again. That's the part that isn't quite right yet. The script never stops.
Any suggestions? Thanks again!
I almost have this thing the way I want but it's not quite right. Here's what I have now:
- Run Program>c:\program files\stats\complab.exe
OnEvent>KEY_DOWN,VK91,0,WinKey
OnEvent>KEY_DOWN,VK92,0,WinKey
SRT>WinKey
Let>kk=0
Repeat>kk
Add>kk,1
Release LWinKey
Release LWinKey
Press Esc
SetFocus>Comp*
Wait>0.01
Until>kk,30
END>WinKey
Label>WindowCheck
GetWindowHandle>Comp*,hwnd
LibFunc>User32,IsIconic,rI,hwnd
LibFunc>User32,IsZoomed,rZ,hwnd
If>rI=1
GoTo>EndProgram
Else
If>rZ=1
Goto>WindowCheck
Endif
Endif
Label>loop
wait>0.01
goto>loop
Label>EndProgram
Press Shift
Press ESC
END>EndProgram
After the user logs into Complab, that program minimizes itself. At that point. i want the script to stop, so that the user has access to the Windows keys again. That's the part that isn't quite right yet. The script never stops.
Any suggestions? Thanks again!
I got this to work, if anyone is interested. Took out the Release LWinkey and Release RWinkey statements and reworked the focus app and kill script sections. Here's what I have now. Any streamlining suggestions would be appreciated.
- Run Program>c:\program files\stats\complab.exe
OnEvent>KEY_DOWN,VK91,0,WinKey
OnEvent>KEY_DOWN,VK92,0,WinKey
SRT>WinKey
Let>kk=0
Repeat>kk
Add>kk,1
Press ESC
Wait>0.05
GoSub>FocusApp
Until>kk,5
END>WinKey
SRT>FocusApp
SetFocus>Comp*
End>FocusApp
SRT>EndProgram
Press Shift
Press ESC
End>EndProgram
GoTo>WindowCheck
Label>WindowCheck
GetWindowHandle>Comp*,hwnd
LibFunc>User32,IsIconic,rI,hwnd
LibFunc>User32,IsZoomed,rZ,hwnd
If>rI=1
GoSub>EndProgram
Else
Goto>WindowCheck
Endif
Here we are approaching three years later. I have a "streamlined" way to stop those pesky user key presses. Basically you just kill explorer.exe. When you're ready to give the computer back to the user you restart explorer.exe
This works for me in WinXP, I have no idea if it will work in Vista or Win7.
Code: Select all
Run>taskkill /f /im explorer.exe
MDL>ok, test all the button combinations you know and see if any work.
Run>explorer.exe