|
Tested on Windows XP and Windows 7 Beta. In PrivilegedRunner.canWriteToProgramFiles(), the path of the windows program directory is hard coded: "C:\Program Files". The problem is, that this is only correct in the english Windows version. For a german Windows XP for example, the path is "C:\Programme". There are two possible solutions. The first solution is easy, but the second solution would probably be better: 1. Use System.getenv("ProgramFiles") instead of the hard coded string "C:\Program Files". 2. Use a native library (JNI, DLL) to call the Win32 API routine SHGetFolderPath with CSIDL_PROGRAM_FILES. I cannot attach a file to this issue, because the status of this issue is "closed". Could someone with admin privileges reopen it, or should I open a new Jira issue? The file is currently at http://www.source-code.biz/temp/izpack/javaSHGetFolderPathTest.zip Re-opened as it still seems to make issues. Added sample code that shows how to call the Win32 API routine SHGetFolderPath using JNI. Added a patch for using System.getenv("ProgramFiles") instead of "C:\Program Files". Thanks Christian, I have applied the non-JNI patch. |
||||||||||||||||||||||||||||||||||||||||||||||
We'll try to get a fix for the release after.