/usr/local or /opt on Windows

6

On Linux systems, you have directory trees like /usr/local or /opt where you can put "custom-installed" applications which don't have a package in your distribution and, thus, do not fit nicely into your distribution's FHS.

On Windows, where do you put applications which do not provide an installer, and, thus, do not split themselves nicely into C:\Program Files (x86) and C:\ProgramData? Is there a well-established convention?


Background: Many small tools (e.g. the sysinternals tools) or Unix-ported applications (e.g. emacs) do not provide a Windows installer but rather a zip file with the instruction to "just extract it anywhere and start the exe file". Now, I could create an arbitrary top-level directory, e.g. C:\Tools, but, being pedantic, I'd like it to have the "right" name. Is there some consensus or does everyone invent his/her own convention for this type of application?

Heinzi

Posted 2016-03-09T20:31:32.387

Reputation: 2 729

2I make a directory called C:\bin and add the it to the system path environmental variable, then dump my executables there. Windows has no real provisions for this type of "installation". You could just as easily make it in C\Program Files (x86)\bin or anywhere else you like, there is no standard for it. – acejavelin – 2016-03-09T20:37:44.233

Answers

1

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.

Clipper

Posted 2016-03-09T20:31:32.387

Reputation: 11

0

No fast rule regarding this.

Suggestion: Go with c:\tools, or c:\opt if you are more familiar with linux.

You might have to change permissions on this new folder as some apps will require elevated permissions to write their own data here.

As developer I'm using this structure:

C:\
+-- code  // for repositories   
+-- data  // db files  
+-- tools // software tools

This makes it easy for me to keep track of the tools I'm using and their configurations when setting up a new dev environment on another machine.

Carl J du Preez

Posted 2016-03-09T20:31:32.387

Reputation: 31