Skip to content


Category: Citrix / Terminal Services

While working on a bunch of provisioned servers(Citrix PVS), I needed to do some modifications on the cache drive. I made a small .VHD image which boots quickly and gives me access to some rudimentary tools. I also had to inject a couple of drivers for the VMWare components.

First of all, install the Microsoft Assessment and Deployment Kit (ADK) and get a copy of the VMWare-drivers(Program Files\Common Files\VMware\Drivers\) from a system with the VMWare Tools installed.

Right-click the shortcut to “Deployment and Imaging Tools Environment” and choose “Run As Administrator”. Use copype to build your own bootable WinPE environment. The syntax is “copype <architecture> <destination>”.


X86-architecture selected for the image and “X:\winpe_x86” used as work folder:


Mount the image:


Inject the needed VMWare drivers (\drivers is the source folder).


Copy any tools you need into the (mounted)image, for example into the folder X:\winpe_x86\mount\tools.


Unmount the image and commit your changes:


Create a boot-ISO (Optional):


Create a virtual hard drive which will be used for provisioning:


Prepare the drive by using MakeWinPEMedia:


Detach the disk and move the .vhd into your PVS server.



You can filter keypresses with keyboard scancodes, it gives you the possibility to redefine keys via the registry. You can bind a key to another key or disable a specific key (CTRL-ALT-DEL combination in kiosk-mode for example).

The scancode mappings are stored in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map

If the “Scancode Map” value doesn’t exist it must be added as a REG_BINARY.


Below the layout of the “Scancode Map” values:

Offset Bytes Information
0 4 Header. Version information
4 4 Header. Flags
8 4 Header. Number of mappings, including the null terminator
12 4 x Individual mappings. 4 bytes for each mapping. DWORD.
last 4 Null terminator (0,0,0,0)


Example: Remap Left Shift to L-key

00 00 00 00 Header
00 00 00 00 Header
02 00 00 00 Two definitions
26 00 2A 00 0026 = L-key. 002A = Left Shift.
00 00 00 00 Terminator

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
“Scancode Map”=hex:00,00,00,00,00,00,00,00,02,00,00,00,26,00,2A,00,00,00,00



Example: Disable CTRL-ALT(-DEL)

00 00 00 00 Header
00 00 00 00 Header
05 00 00 00 5 definitions
00 00 1d 00 0000 = Nothing. 001d = Left CTRL
00 00 38 00 0000 = Nothing. 0038 = Left ALT
00 00 1d e0 0000 = Nothing. e01d = Right CTRL
00 00 38 e0 0000 = Nothing. e038 = Right ALT
00 00 00 00 Terminator

GPO registry settings:



There is a tool available to help you find the mappings :



How to (re)enable Quick Launch Toolbar on Win7 and later OS;es

  1. Right-click the taskbar, point to Toolbars, and then click New Toolbar.
  2. In the New Toolbar dialog box, in the Folder text box, type %userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch, and then click OK.
  3. Right-click the taskbar and click to disable the Lock the Taskbar setting.
  4. On the taskbar, right-click on divider. Make sure that the Show Text and Show Title settings are disabled, and that the view is set to Small Icons.


Information from:


There is no easy way to Pin items to the Start Menu or on the Taskbar, it is by design to prevent programs filling up these locations ( ). However it is possible to script the pinned items.


When you rightclick on an object (shortcut / file) in explorer, you are presented with a context menu. These actions are known as “Shortcut Menu items” or “Verbs” in shell terms. These verbs can be enumerated and executed programmatically.



Example to get all verbs on the Internet Explorer link:


Result from the example above:


When scripting, you basically point out the object , and apply an action(verb):