Re: Disabling PRINT SCREEN Key

From: Diana Smith [MSFT] (diasmith_at_online.microsoft.com)
Date: 01/13/04


Date: Tue, 13 Jan 2004 10:15:38 -0500

Hello,
35968 CALL SetUEvent in Assembly Routine to Disable PRINT SCREEN
http://support.microsoft.com/?id=35968

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.

"P-X.Lhomme" <pierre-xavier.lhomme@comprendium.ch> wrote in message
news:09dc01c3d91f$5bcf4630$a601280a@phx.gbl...
> Hi,
>
> I'm looking on how to disable the screen capture (PRINT
> SCREEN and ALT+PRINT SCREEN) in Windows 2000 and upper for
> security reasons.
>
> I have check with Keyboard Layout Creator (MSKLC.EXE) but
> it doesn't seem to provide this kind of functionality and
> I don't found entries regarding this problem in the
> security policies.
>
> Does someone knows how I can do this ?
> PiXeL.



Relevant Pages

  • Re: Unable to retrieve the complete description string of the event log record
    ... events in the Registry, under HKEY_LOCAL_MACHINE (which requires elevated privileges to ... "Description" message string of the event log record. ... below but still I'm not able to retrieve the complete description. ...
    (microsoft.public.vc.mfc)
  • Re: Importing Excel files with columns > 255 chars
    ... or similar string manipulation to get the required maximum length. ... to change the column width of Error output columns, ... Create a connection to that spreadsheet and check the data ... the following registry key when reading the spreadsheet: ...
    (microsoft.public.sqlserver.dts)
  • Re: ascii -> hex-wandler und Reg_Binary eintrag
    ... Integer usw. und Strings klar machen. ... Damit schreibst Du die ASCII-Werte der in dem String OutputText enthaltenen ... Zeichen in die Registry. ... Du solltest Dich erst mal gründlich mit Grundlagen wie Datentypen ...
    (microsoft.public.de.vb)
  • Re: Editing Registry in WinCE 6.0
    ... ActivateDeviceEx and DeactivateDevice calls to load/unload my driver. ... This reads a string value from the reg. ... Copy this registry to file. ... Saves you from having to reboot all the time... ...
    (microsoft.public.windowsce.platbuilder)
  • OT - Another Windows Vulnerability
    ... The now infamous Regedit vulnerability ... "The weakness is caused due to an error in the Registry Editor ... Utility when handling long string names. ... to hide strings in the "Run" registry key. ...
    (rec.outdoors.rv-travel)