Yes, you can. However, you will need a third-party tool called Win+X Menu Editor for that. To my knowledge, there are no official methods or tools to achieve that. But I strongly believe they will be released by Microsoft in the future.
The detailed step-by-step tutorial can be found here. What goes on behind the curtain is this:
- The menu items are regular Windows shortcuts, so you need to create them manually.
- The shortcuts should be marked as valid for loading with a special tool.
- Valid shortcuts are copied into the
%LocalAppData%\Microsoft\Windows\WinX\GroupN directories, where N is a number of the target group (there are 3 groups by default).
Win+X Menu Editor has a nice GUI to make all these operations automatically:
Here is what the menu looks like after I have added the Wordpad link:
Update: As per Karan's request: the special marking of links is made by a tool
hashlnk.exe (See Rafael's article). It basically takes the link's target path and command line arguments and then calculates an integer number based on them. This number is later written inside the link file itself. The
hashlnk itself is an open source tool written by Rafael Rivera and its source code is uploaded to the Github. The main C++ file calculating then hash is here, and I can assure you, it does nothing malicious.