How to Disable the sleep button in the keyboard for users?

Dear Sir,

I have Windows 2003 R2 as Active Directory with group policy configured for students in a Lab.
Students are using the sleep button in the keyboard to log out from their NETOP session.
How can I disable the sleep button in the keyboard through group policy?

Please any help...
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Glen KnightCommented:
There is a guide on how to do this here:

As far as I am aware this cannot be done with Group Policy
ISC-IT-AdminAuthor Commented:
Hi Demazter,

Is there any thing more easier to do this?
Like a reg key to be imported to the registry to disable the sleep button.
Our keyboards are USB...
ISC-IT-AdminAuthor Commented:
Honeslty the microsoft article is complicated a little bit...
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Glen KnightCommented:
I don't believe so, there may be 3rd party tools out there that can do it for you.

Having a School that I look after myself brought this problem up for us as well.  we researched for quite a while trying to find a solution, in the end we replaced the keyboards because the 3rd party software was too expensive.
Have not tested but this vbs script may do what your after.  Backup your registry first.  Save code as a .vbs file and run.
Option Explicit

Set WSHShell = WScript.CreateObject("WScript.Shell")
Dim WSHShell, n, p, itemtype, mybox

p = "HKEY_USERS\.DEFAULT\Control Panel\PowerCfg\CurrentPowerPolicy"
itemtype = "REG_SZ"
n = "4"
WSHShell.RegWrite p, n, itemtype

MyBox = MsgBox("You must Log Off/Log On for the changes to take effect.", 64,"Done")

Open in new window

ISC-IT-AdminAuthor Commented:
Thank You djpazza,

Coulld you explain for me this script and how to import it to the group policy?
So this VB script is not tested... I'm taking risk...
ISC-IT-AdminAuthor Commented:
I need to run this sript on every machine?

ISC-IT-AdminAuthor Commented:
Dear Djpazza,

Please note that I tried and I run the script abobe, but it didn't work...

I turned off manually the sleep button from the control panel / Power option.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Glen KnightCommented:
Did you try the microsoft option I provided?
ISC-IT-AdminAuthor Commented:
No I didn't try the Microsoft Option... As I have an easy way to do it in Control Panel...
I was looking for a script or policy to force it on all Pcs...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.