Disable Print Screen Function Via VBS Script (By using GPO Startup/Shutdown Script)

Another requirement, now customer need to disable default windows Print Screen function on all of their user desktop,

So, we started our searching again, and easily we able to find out how to disable print screen on windows by importing following registry.

So, again we start working to create a custom adm file. As because this is a HKLM key, so we need Privilege to import it into registry, and only way to do so is to apply some policy via Computer Configuration, whit which we can force policy on each computer not on individual user.

But suddenly we discover that ADM files don’t support reg_binary values, so we have to find out any other alternatives.

Now we have to create tow .VBS file, one for to disable print screen and another for to re-enable print screen,

VBS Script for disable print screen,

VBS Script for re-enable print screen

Now we can easily implement above two script via GPO by using system Startup/Shutdown script.

Thanks.. 🙂

Disclaimer: All posts and opinions on this site are provided AS IS with no warranties. These are our own personal opinions and do not represent our employer’s view in any way.

This article currently have 57,899 views

Saugata
Follow me

CC BY-ND 4.0 This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.

32 comments

  1. I am sorry but somehow it does not seem to work.
    Even when applied directly in XP. The registry is changed. but after pressing the printscreen button, I can still paste the screen captured result in word or painter.
    What am I missing here?

  2. Did you restart your system after executing the script?

    if still it’s not working, can u upload ur script(in zip/txt format) to rapidsahre or somewhere else so i can re-check the script..

  3. You are right! When appied directly to XP desktop, it works perfectly after logout and login.
    Now I really want it to work also when users login to my server(using Remote Desktop Connection).
    I followed exactly the steps above. Added the DPrintScreen.vbs in my windows 2000 server GPO’s Computer Startup script and the User login script. Then restarted the server.
    But the problem is that it will still allow the user to printscreen. Any ideas? Thanks for your kind help.

  4. This script required admin rights to modify registry settings, So, if u put it as user logon script, it will not work, u have to set it as computer logon script, so it can execute with system account privilege.

    Check the screen shot, i have applied it on Computer Configuration startup script.

    Hope this will solve your problem.

    Thanks
    Saugata 🙂

  5. Yes! I have applied DPrintScreen.vbs on GPO’s Computer Configuration Startup Script as well.
    Also given the user administrators previlege.
    But when the user login using Remote Desktop Connection, he can still print screen.

  6. Just found this; the .vbs errors out on the second line of either, i.e. the declaration of the constant.

  7. Yes. It worked. We were using this for a training room so candidates could not copy screens to cheat on their tests. Thanks!!

  8. It worked perfekt, but only with administrative accounts. When i tay to use GPO with logon scripts, the restricted users can not execute the script. The script change registry value, so onli administrator are able touse it and the machine must be restarted.

    Does somebody have any aidea, how the script are able to be executed by the restricted users ?

  9. Great blog here! Also your site loads up fast! What host are you using?

    Can I get your affiliate link to your host?
    I wish my website loaded up as quickly as yours lol

  10. Pingback: Google
  11. Hi : I have a requirement where the user would be logging in from personal device to his office desktop via remote desktop connection and then connect to client VDI. How to disable the print screen in RDC. Does the same solution work ?

  12. can i send to you the script I saved from yours and see what is wrong as I am getting line 7 char 1 error after replacing & to & in disable ps.

  13. I am trying this script on windows 2016 server, getting line2 ,char 28 compilation error,after replaced “& amp ;” with & also same error. Kindly suggest.

Leave a Reply to temple run 2 cheats Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.