Tuesday 10 October 2017

windows - Utility to create symlinks for all executables in the Start Menu?


It's really annoying in Windows that if you want to run about any third-party program from the command line, you either have to use its full path or manually add its containing directory to PATH.


Is there a utility that scans all entries in the Start Menu, and creates a symlink to each of the executables in a certain directory, so that I only have to add this one directory to PATH?



Answer



I've implemented this functionality with a Python script.


This is surprisingly difficult to make it right though:




  1. Shortcuts work in the shell (Run Dialog, double clicking the file, etc), but not in Cmd.




  2. Symlinks work in Cmd, but not in the shell.




  3. Hardlinks work in both, but can't cross partition boundaries.




I ended up using shortcuts. On the command line I have to type program.lnk for it to work, and this is on Windows 7, it doesn't work in XP.


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...