Friends

Saturday, August 4, 2012

[Exclusive] How to Add New Shortcuts in Quick Access Menu (Win+X Menu) of Windows 8?

NOTE: Windows 8 is under development and it might be possible that Microsoft will provide an easy and built-in option to add new shortcuts to "Win+X" menu so we recommend you to not modify system files. If you still want to add new shortcuts in beta builds, following method will help you.
If you are using Windows 8 Consumer Preview, you might be aware of new "Quick Access Menu" which shows list of lots of useful system shortcuts such as Control Panel, Task Manager, Device Manager, Search, etc.
You can access this new menu by right-click on bottom-left corner of screen or using "Win+X" keyboard shortcut, that's why this new menu is also called "Win+X Menu" by many people.
Recently we found a way to customize this menu. We told you how to remove unwanted entries from this menu, how to rename existing entries and how to move entries position. You can read the full tutorial at following link:
[EXCLUSIVE] Customize New Quick Access Menu (Win+X Menu) in Windows 8
But at that time we couldn't find a way to add new shortcuts to this menu. Although we were successful in changing the target path of shortcuts and we were able to launch desired programs using those shortcuts but that only worked until we restarted the system. As soon as you restart or log off the system, Windows automatically removes those modified shortcuts from the menu.
We investigated a lot, we searched in Windows Registry, system files and folders to find out a way to add new desired program shortcuts in "Win+X Menu" of Windows 8.
And now we are able to do it. A big thanks goes to our reader "Christopher Jolly" for his help. Without his help, it was not possible.
Following video demonstrates the new working shortcuts in Win+X menu:

So how did it become possible? How did we manage to add new working shortcuts to Win+X menu? Here is the answer:
Actually Windows 8 does a hash check on all shortcuts present in "Win+X" menu each time you start Windows. When we modify a shortcut and restart system, Windows does the check again and when it finds an incorrect hash value, it automatically removes the shortcut from the menu. That's why when we add new shortcuts, Windows doesn't find their hash values in a built-in list, hence it doesn't show them in the menu.
What we did? We disabled this hash checking by modifying a system file. The system file which is responsible for this hash checking is "twinui.dll" present in "C:\Windows\System32" folder. This file is also responsible for showing new Start screen and other metro UI stuff.
We modified the file using a Hex Editor and patched the hex code which was causing this hash check.
So the bottom line is that if you want to add new shortcuts to "Win+X" menu, you'll need to patch "twinui.dll" file to disable automatic hash checking.
Following screenshot shows the newly added shortcuts in "Win+X" menu:
New_Shortcut_Added_Windows_8_Win_X_Menu.png
Once you patch the DLL file, you can add as many shortcuts as you want in "Win+X" menu.
Following are the required steps to patch the DLL file and disable hash checking:
NOTE: Please be very careful while modifying system file. A small mistake while modifying the file might cause a broken Desktop.
PS: If you don't want to patch the file manually, an already patched file is given in Step 6 for download.
1. Download and install a Hex Editor if you don't have it in your system. We used XVI32 which is a free and portable hex editor.
2. Now copy "twinui.dll" file from "C:\Windows\System32\" to some other place. You can copy it to another drive or folder for example in D:\ drive.
3. Now open copied "twinui.dll" file in Hex Editor. Now you'll need to search for following hex code:
32-bit users:
50 E8 AD FA FF FF
64-bit users:
E8 EF F9 FF FF
The above hex code exists in default "twinui.dll" file in Windows 8 system having version number 6.2.8250.0. If you have installed a recently released update, you might have a new version of DLL file which is 6.2.8250.107.
For users who have new version of DLL file, you'll need to search for following hex code:
32-bit users:
50 E8 B1 FA FF FF
64-bit users:
E8 F3 F9 FF FF
You can check the file version number using its Properties.
If you are using XVI32 hex editor, you just need to press "Ctrl+F" keys and type the above mentioned hex code in Hex string text box and click on OK button.
4. You might get more than one instance of the above mentioned hex code but you'll need to modify only one instance which has:
32-bit users:
24 0C hex values before it and 85 C0 hex values after it.
64-bit users:
4D 48 hex values before it and 85 C0 hex values after it as shown in following screenshot:
Original_twinui_DLL_Hex_Code.png
5. Once you find the hex code, replace it with 90 90 90 90 90 in 64-bit system and 90 90 90 90 90 90 in 32-bit system. Note that 32-bit Windows edition requires 1 extra hex code to be replaced.
To replace the hex code, just click on the first block containing E8 in 64-bit Windows and 50 in 32-bit Windows and type 90 on your keyboard. Now type 90 again and the hex editor will automatically replace next hex code value.
Hacked_twinui_DLL_Hex_Code.png
6. Once you finish patching the file, save the file and close hex editor.
NOTE: If you don't want to patch the file manually, you can download a ready-made already patched twinui.dll file using following link:
Download Link
The above mentioned ZIP file contains patched twinui.dll file for both 32-bit and 64-bit Windows editions.
7. Now you'll need to replace default "twinui.dll" file present in "C:\Windows\System32\" folder with the new modified file.
To be able to replace the file, first you'll need to take ownership of the file using following tutorial:
How to Take Ownership of Files or Folders in Windows?
8. Once you take ownership and full control on the file, rename the file to some other name such as twinui_bak.dll or any other desired name. Now copy the new modified twinui.dll file and paste it in "C:\Windows\System32\" folder.
9. That's it. Restart your system and now you'll be able to add new working shortcuts in "Win+X" menu.
Adding_New_Shortcut_Windows_8_Win_X_Menu.png
Just create your desired new shortcuts in "Group1", "Group2", "Group3" or newly created folders under WinX folder as mentioned here, restart Explorer as mentioned here or restart Windows and you'll get the new shortcut in "Win+X" menu which will actually work.
UNDO STEPS: If you break your Desktop after modifying the file, you can restore default twinui.dll file again which you renamed in step 8. Just press Win+E keys together to open Windows Explorer, go to "C:\Windows\System32" folder, rename new modified twinui.dll file to some other name such as "twinui_bad.dll" and then rename default original twinui_bak.dll file to twinui.dll again. Restart Windows and your working Desktop will be back.

0 comments:

Post a Comment

#
### ###