Disabling ALT+Print Screen and/or Print Screen functionality

(imported topic written by amitspradhan)

Is there any way wherein we can disable the ALT+Printscreen and/or Printscreen functionality for a logged in user using any script in Big Fix ?

(imported comment written by BenKus)

Hey Amit,

If you can find a way to do it with any utility, script, registry change, or file change, then we can do it through BES with a simple action.

Do you happen to know how to do it on a single computer?

Ben

(imported comment written by Manwin91)

Hi Amit,

I’ve got some good news for you, a colleague of mine Dominic and I saw your post and we’ve gone about trying to figure out how can we use BigFix to disable off the ALT+Printscreen and Printscreen functionality and have found out the method to do it.

So here’s the coding

Relevance Statement

(name of operating system = “Win2000” OR name of operating system = “WinXP” OR name of operating system = “Win2003”) AND (((not exists key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout” of registry) OR (not exists value “Scancode Map” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout” of registry)))

Action

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

" “Scancode Map”=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,00,00,00,00

action requires restart

The scancode is based on a microsoft document for remaping of keyboard buttons, in the Scancode Map what we’ve done is to change the mapping of Print Screen and Alt-Print Screen to a null value thus the 2 key strokes are disabled.

On top of that this setting requires a reboot before it takes effect, as the Scancode is loaded in upon startup of the OS

This fixlet is only tested on a WinXP machine but through our research it is suppose to be applicable to Win2k and above.

Hope this is helpful!

Cheers,

Manwin

(imported comment written by Rolf.Wilhelm91)

Hi Manwin,

regset “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout” “Scancode Map”=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,00,00,00,00

which positions inside of this string did you change to “00” ?

I suppose that the values inside are subject to be different on different keyboard layouts…

Regards,

Rolf.

(imported comment written by dcheah)

Hi Rolf,

That is correct, the scan codes typically differ for other non-US keyboard mappings.

As long as you know the scancodes for the key you want to remap, this method should work for you.

For details on the format, pls refer to the below:

http://www.microsoft.com/whdc/device/input/w2kscan-map.mspx

(imported comment written by amitspradhan)

Hey Manwin, Dominic,

This works great, I have tested this and it worked.

I was still trying to find, as even put forth by Rolf, which values have been changed. Tell you the truth, I went through the doc and tried doing some trial and errors, but it did not work.

Cheers,

Amit

(imported comment written by dcheah)

Hi Amit,

Here’s the basic idea.

hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,00,00,00,00

the above string actually consists of a few blocks

00,00,00,00, <-null

00,00,00,00, <-null

03,00,00,00, <-denotes number of blocks following (includes last null block)

00,00,37,e0, <-mapping 1, changes E0 37 (printscreen) to null

00,00,54,00, <-mapping 2, changes 54 (Alt+printscreen) to null

00,00,00,00 <-null

It is important to remember that entries stored in the registry are always in little Endian format

Hope this makes it clearer.