Take the 2-minute tour ×

I want to install a Java based service application on a Windows server. In Linux I would install it in /opt or /usr/local but for Windows I am not sure what the recommended practice is. Would it just be Program Files or is there a better place?

Note: This is a manual install, there is no installer.

share|improve this question
This is for a manual install of a bundle that has no installer... just a Java server with bundled app and JSW as part of it. Just wondering where to put it best. –  Manfred Moser Feb 6 '12 at 23:25

2 Answers 2

up vote 1 down vote accepted

Please note that the paths I mention have been introduced in Vista, so this is not valid for XP-area systems.

Generally speaking, if your application is not tied to a user account, because

  • several different user accounts on the machine use the application or
  • it's a service ran by the System account

you should put the application in the Program Files folder. Please note that on 64bit systems, 32bit application go into the Program Files (x86) folder and 64bit applications go into the Program Files folder.

If the application is installed for a single user, it should go into Users\<username>\AppData\Local folder.

However, you should never assume any of these locations exist by those names. You should always use the functions provided by the shell to look up the proper locations (like SHGetKnownFolderPath ).

share|improve this answer
I disagree - if you are not the developer of an application, and if the developer has not documented the correct installation procedure, it is safest to avoid paths containing spaces because you can't be sure that the developer has properly taken that possibility into account. I usually create a folder c:\apps and put this sort of application in there (one subfolder per application). –  Harry Johnston Feb 7 '12 at 2:05
Question though. How can I prevent Windows from doing the shadowing of registry in the specific users registry and shadow folder. This seems to confuse my apps discovery of where it is running from? Or should I install it into the users home folder since it is supposed to run as a specific user. –  Manfred Moser Feb 7 '12 at 23:52
@ManfredMoser I don't really understand the first question. If the application is ran as a specific user only, then, yes, install it in the users profile folder (AppData\Local). –  Oliver Salzburg Feb 8 '12 at 0:08
Due to the "File and Registry Virtualization" feature in Windows 7 and Vista writes are redirected(and subsequent reads) to a per-user location within the user’s profile. So if I install the app into programfiles but it will actually be run as a specific user data will end up in that users VirtualStore. This will confuse the server app, since it will not be able to determine its root directory properly. So would it be best to run it as a specific user and install it into that users folder like you mentioned then? –  Manfred Moser Feb 8 '12 at 0:15
@ManfredMoser I really can't say right now. Maybe this warrants an additional question so other users can give their input? –  Oliver Salzburg Feb 8 '12 at 0:23

I would recommend Program Files. The Windows and System folders should not be used for non-OS apps, and the root of the drive is, well, so 90s.

share|improve this answer

Your Answer


