[izpack-devel] Finding Default InstallationDirectory for Programs under Windows

Markus Schlegel markus.schlegel at pulinco.com
Tue Nov 28 11:32:46 CET 2006


Hi
I already posted this issue on the User mailinglist.
 
The current official Release (3.9.0) does not read out the ProgramFiles Folder from Windows. Instead it is read from a Properties file according to the current Language on the system.
 
On International Installations of Windows with LanguagePack != English, this fails always. Outside English-spoken countries, the international Version of WindowsXP is the Quasi-Standard for Companywide Installations of Windows.
 
On such Systems, the Programfiles Folder is "Program Files" per default, no matter which languagepack is installed (so you have a german system with "C:\Program Files" as the Programs folder.
 
I made a patch now, which tries to read the Environmentvariable "ProgramFiles" in the class "InstallerBase". If it fails or is not defined, it falls back to the current implementation, which is sufficient for older (pre W2K) systems (even if it is quite adventurous to derive the drive letter from the user's home path). I took the Environmentvariable instead of the Registry Key because reading out the registry Key requires further classes and components.
 
What is left as a todo is the fact, that there is a Class called "TargetFactory" with a Method "getDefaultInstallPath" which is in fact never called. The Documentation states, that one can define a default installationdirectory using the resource "TargetPanel.dir". Due to the Fact, that "TargetFactory.getDefaultInstallPath" is never called, the setting of TargetPath.dir has never an effect!
 
What should be the desired Functionality? Should the Value from "TargetPanel.dir" overwrite the System default if defined? Is this feature ever used (its very uncommon to do this when packaging the installer)?
 
Regards
Markus Schlegel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-devel/attachments/20061128/a3b78561/attachment.html 


More information about the izpack-devel mailing list