installation of Java app under Vista/ System.getenv("ALLUSERSPROFILE")
802908Jan 16 2008 — edited Jan 17 2008Hello
at the moment im trying to install my Java (JDK 1.5.012) application under Windows Vista.
I have several ini files, db files and log files, and everybody should have read and write access on them.
So i removed them from the "C:\Program Files" path, since virtualisation takes place which id like not to depend on.
Ive read that "C:\Documents and Settings\All Users" is the right place for such stuff (or better said an own subdirectory under this path).
Now im looking for a way to retrieve this path. I have tried System.getenv("ALLUSERSPROFILE"), and on my W2000 machine, it returns "C:\Documents and Settings\All Users" which is fine. On my Vista machine, the same
function returns "C:\ProgramData", but this is a virtual path.
How can i retrieve the All Users path under Vista using System functions?
I dont want to hardcode this, because this path is certainly different under different languages.
friendly greetings
BB