Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This may not be the best place to post this, but my question is asking the sort of the opposite of What is the equivalent to the Windows "Program Files" folder? .

I'm new to windows and am used to the unix style file system, where there are designated folders for certain types of files. I'm wondering what the normal way to install programs is in windows, specifically ones that will be started from the cmd prompt.

So far, I have been adding user environment variables for each program, and appending this variable to the PATH. So, for gvim, I would add

GVIM_HOME

and then append to my path:

%PATH%;%GVIM_HOME%

But now I'm wondering if I should just create a folder and add it to the path, and then put shortcuts to my exe's into that folder. Do any of you know the usual way this is done?

share|improve this question

closed as off topic by Uri Herrera, Luis, qbi, N.N., fossfreedom Dec 19 '12 at 21:48

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
This is better suited here: SuperUser –  Uri Herrera Dec 19 '12 at 20:44

2 Answers 2

It's very interesting to know that you started out with Unix :-)

Generally, in Windows directories/folders are not organised with the same idea as they are in Unix/Linux. I normally have a "System" partition where I install Windows itself and my applications, and a "Data" partition where I keep my own data. In Post-XP Windows, this may be a bit tricky to accomplish but anything you open and close yourself can be stored in Data partition.

Back to the System partition, the default install location for any programs is "C:/Program Files" or something else that the installers will figure out itself. Under "Program Files" binaries, documentations and all supporting files are there for the programs to run. But for programs like GVIM, I would suggest you put it under C:/ and use path without spaces. And then you update %PATH. That's how I install Perl and other pure commandline tools which are more popular in Unix world. Or to be more organised you can create a folder like C:/cmdtools and put programs you install manually there.

share|improve this answer

AFAIK there's no "usual way" of doing this, mainly because in the (non-server) Windows world, programs are designed to be run via the UI. But I just checked the %PATH% variable of a nearby Windows box and it has a zillion different paths in it, so that's probably the most common behavior.

It's also a good idea because Windows shortcuts don't work quite like *nix soft symlinks. They're actual files on disk (.lnk), not references to other locations on the filesystem. You can have a directory full of shortcuts, and you can invoke them from inside cmd.exe (e.g., c:\>program.lnk will run c:\foo\program.exe), but each shortcut has a parameter which tells c:\foo\program.exe the directory in which it's to begin its execution. It's not like $PWD or /proc/[pid]/cwd in *nix. It's pretty important to not mess up, because it affects things like DLL loading.

(also, having to call foo.lnk from the CLI instead of just foo seems kind of klunky to me.)

this is my experience on XP Pro anyway. YMMV with newer versions of Windows and command shells.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.