Jump to content











Photo

Registry adding

hklm registry

  • Please log in to reply
4 replies to this topic

#1 MasterG

MasterG
  • Members
  • 8 posts
  •  
    Greece

Posted 11 December 2015 - 06:08 PM

Hi, i am trying add a key to the registry to stop all the WIN+ Keyboard Shortcuts (Hotkeys).

In normal windows you would create a notepad file with .reg and the lines:
 

REGEDIT4
[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,5b,e0,00,00,5c,e0,00,00,00,00

After rebooting you can not access the windows shortcuts.

I added the following lines:
RegHiveLoad,Tmp_Default,%RegDefault%
RegWrite,HKLM,0x3,Tmp_Default\SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map,"00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00"
RegHiveUnLoad,Tmp_Default

With this code the key ends up in 3 places:
HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\Keyboard Layout
HKEY_USERS\S-1-5-18\SYSTEM\CurrentControlSet\Control\Keyboard Layout
HKEY_USERS\.DEFAULT\SYSTEM\CurrentControlSet\Control\Keyboard Layout

Can anyone suggest a solution?

The whole idea is to create a USB3 WinPE that you can only access a couple off apps from the desktop and shut down afterwards. No access to Windows Explorer.

Thank you
 

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 December 2015 - 06:16 PM

I am not sure to understand.

The "CurrentControlSet" does not exist "offline", it is created at boot time out of ControlSetxyx, (usually only two of these exist, 001 and 002, but there may be more).

Which ControlSet is loaded by default is in the HKEY_LOCAL_MACHINE\SYSTEM\Select key.

 

:duff:

Wonko



#3 Tripredacus

Tripredacus

    Frequent Member

  • Expert
  • 234 posts
  • Interests:K-Mart-ian Legend
  •  
    United States

Posted 11 December 2015 - 09:39 PM

The whole idea is to create a USB3 WinPE that you can only access a couple off apps from the desktop and shut down afterwards. No access to Windows Explorer.


Then why even add Explorer to your WinPE? Why not use a launcher of some sort as the shell instead?

#4 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 13 December 2015 - 07:01 PM

Use:
RegHiveLoad,WB-System,%RegSystem%  --> Ends up Here: HKLM\SYSTEM\
 
Change:
FROM: RegWrite,HKLM,0x3,"WB-System\SYSTEM\CurrentControlSet\Control\Keyboard Layout","Scancode Map","00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00"
Which would have written to   HKLM\SYSTEM\SYSTEM\..\
TO:   RegWrite,HKLM,0x3,"WB-System\ControlSet001\Control\Keyboard Layout","Scancode Map","00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,00,00"
                                                Remove \SYSTEM                                                                                 Check your REG_BINARY entries above, you may need to remove " "
 
 
RegHiveUnLoad,WB-System
 
Regards
RoyM


#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 December 2015 - 07:45 PM

Well, not really-really :(, as said the ControlSet in use is determined by the Select key.

 

Though it is normally 001 :), there is nothing preventing some other plugin/script to set it to 002, so it is advised to ALWAYS check which ControlSet will be used OR - better - make the change on BOTH the 001 and 002.

 

If you prefer, ControlSet001 will work in 99.99% of builds, but there is no way to know if - for any reason - the OP's build will belong to the remaining 0.01%.

 

The thingy by Erwan has inbuilt the dynamic translation from CurrentControlSet to ControlSet001 or 002 (or whatever):

http://reboot.pro/to...fline-registry/

but still to be on the safe side in this case it would be IMHO better to have that binary value written to both ControlSet001 and ControlSet002. 

 

:duff:

Wonko







Also tagged with one or more of these keywords: hklm, registry

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users