Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Print Screen via Registry

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I am trying to disable the print screen key via the registry. we have in house applications that cannot be copied to the clipboard and pasted into Paint. can someone give me an example on how to do this..

I would call the .reg file via login script(novell) I just need an example of where in the registry to disable this..

Thanks in advance

 
Hello devannoy,

This NG posting by Diana Smith, MSFT is so graphic detail for an outsider on this issue:
that I cannot resist to quote in full for the benefit of other members.
Code:
[COLOR=blue]<quote Diana_Smith_MSFT>[/color]
Hello,
35968 CALL SetUEvent in Assembly Routine to Disable PRINT SCREEN
[URL unfurl="true"]http://support.microsoft.com/?id=35968[/URL]

Also:
We have a way to disable the Print Screen key and the combination of CTRL+Print Screen and the combination of ALT + Print Screen.  This method should work to meet your needs but has not been extensively tested.  If this does not work, then we are still back to recommending the CTRL2CAP utility from systinternals.com, or a custom-made tool that does what the CTRL2CAP tool does.

I must iterate that while we were able to test this successfully here on our TEST machines, it is critical that you extensively test this on your PRODUCTION machines because we cannot predict whether or not this will affect any other key or key combination on the keyboards. According to the scancode documentation this should not, however one can never be too careful.

The following issues exist:
 - Once the map is stored in the registry, a system reboot is required to activate it.

 - The mappings stored in the registry work at system level and apply to all users. These mappings cannot be set to work differently depending on the current user.

 - The current implementation restricts the functionality of the map such that mappings always apply to all keyboards connected to the system. It is not currently possible to create a map on a per-keyboard basis.

 - Use of the Accessibility Features will bypass this method.  The accessibility features keypress functions are not true keyboard scan codes, and therefore not subject to this registry setting.


Regarding the data structure:

Looking at scancode.doc (on Technet), here are the 3 "make" codes for the Print Screen key:
E0 2A   E0 37
E0 37
54

Note that scancode.doc is stored as a self-extracting .exe zip on technet. Search technet for scancode.exe!!!!

Now to plug these three hex values into the aforementioned binary string... must be read in reverse-order bits, so flip each of the nibbles in each 4-byte string:

E0 2A   E0 37 >becomes > 2AE037E0

E0 37 >becomes> 37E0

54 > becomes > 54 (obviously)


The registry key is mapped as follows:

00000000 >> Header (normally all zero)
00000000 >> Flags (normally all zero)
04000000 >> Count Index (= number of entries + null footer)
2AE037E0  >> Entry 1 (1st key to disable: Print Screen)
000037E0 >> Entry 2 (2nd key to disable: CTRL+PrintScrn)
00005400  >> Entry 3 (3rd key to disable: ALT+PrintScrn)
00000000 >> Null Footer


This is the format of the binary string to place into the registry:

0000000000000000040000002AE037E0000037E00000540000000000


This binary string will grow for each additional key to be disabled.  So for example if you wished to implement these changes IN ADDITION to KB article 216893, you would recalculate the string's count index to have 5 entries
instead of 4, using the above format.  This is how you combine multiple key maps into this string.

Implementation:

Steps to disable the print screen key:

1. Click Start, click Run, type "regedt32" (without the quotation  marks), and then click OK.

2. On the Windows menu, click "HKEY_LOCAL_ MACHINE on Local Machine".

3. Click the System\CurrentControlSet\Control folder, and then double-click the Keyboard Layout folder.

4. On the Edit menu, click Add Value, type in "Scancode Map" (without the quotation marks), click REG_BINARY as the Data Type, and then click OK.

5. Type "0000000000000000040000002AE037E0000037E00000540000000000" (without the quotation marks) in the Data field, and then click OK.

6. Close the Registry Editor and restart the computer.

This registry key may be exported for implementation via the REGINI resource kit tool.

Thank You.

Diana.

This posting is provided "AS IS" with no warranties, and confers no rights.
[COLOR=blue]</quote>[/color]
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top