/usr/local or /opt on Windows
As I often have the same small tools at home and at work, and because usually companies do not let users have admin privileges, installing in e.g. C:\tools
or even "C:\Program Files\Tools"
is not an option. In order to keep my install scripts the same, I use a root junction which points to my user directory. That junction requires admin privileges but it's a one shot:
C:\>mkdir %USERPROFILE%\localapp
C:\>mklink /J localapp %USERPROFILE%\localapp
Then you can provide C:\localapp
to MSI installers of portable tools or unzip tools there, even without privileges, and use that in the PATH. I have for example the same at home and at work:
C:\localapp\Mozilla
C:\localapp\Sysinternals
C:\localapp\Joeware
...
Up to a certain extent (like the fact that the junction may not exist), it also allows you to have the same tools on all computers if using a roaming profile.
You could as well install in C:\Users\yourself\localapp
directly but in my case my user name is not the same everywhere, and %USERPROFILE%
can't always be used unexpanded (e.g. in registry) so it's a pain.