Friday, 30 November 2018

jumplist - Force Windows 7 to pin a file with no extension to the Jump List for Notepad


I want to add the "C:\Windows\System32\drivers\etc\hosts" file to the Jump List for notepad.exe on a Windows 7 machine, but since the file does not have an extension there is no default program associated with it. This means it never shows up in the recent list and you also cannot drag it to the task bar to manually pin it to the start list. I've had problems with jump lists before, and there are ways to use the Registry or File system to change how Jump Lists work, but I haven't seen anything to manually edit a jump list yet. Is there any way to force an item to be pinned to the jump list when that item does not have a program associated with it?



Answer



OK I did a little playing.


If you give your user write access to the HOSTS file (dangerous if malware runs as you) you can then create a hardlink to the file (as admin) using a .txt extension that you can edit.


Open a cmd prompt as Administrator and use FSUtil to make a hardlink in a folder you have full access to (like your desktop):


fsutil hardlink create C:\Users\%USERNAME%\Desktop\PinnableHosts.txt C:\Windows\System32\drivers\etc\hosts.

You can then open "PinnableHosts.txt" in Notepad and when you edit it, the changes will be reflected in your HOSTS file (and vise versa, since they're linked).


It will (should) then be in the 'recent list' for Notepad, and therefore available to be pinned.


HTH.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...