[izpack-devel] Finding Default InstallationDirectory for Programsunder Windows

Bartz, Klaus Klaus.Bartz at coi.de
Tue Nov 28 12:27:32 CET 2006


Hi Markus,
in the meantime I agree with you that IzPack should also find the right default path
for applications on boxes with WindowsXP.
Last time we have discussed a little bit about the best way. 
I am waiting for a WSH script from you until yet...But I agree with you, that a simple environment
variable usage will be more robust, if the setting is common. I agree also, that it should have 
the old behavior as fallback. It should be no problem to check the existent of the variable,
check the existent of the given path and so on. 
You sad, you will create a patch for InstallerBase. Nice, I will wait now for this.
You know patch as diff -u or as patch file.
To the other points of your email I can see only less because the code was not written by me.
May be it is quite adventurous or the usage was very uncommon, but I think the developer has 
thougth something about it. You know, the code is a little bit older.  Do you ever worked 
with Java 1.1.8 on Windows 95?
 
As I sad, I am waiting for your patch (that with the environment variable)
 
Cheers
 
Klaus
 
 

-----Original Message-----
From: izpack-devel-bounces at lists.berlios.de [mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Markus Schlegel
Sent: Tuesday, November 28, 2006 11:33 AM
To: izpack-devel at berlios.de
Subject: [izpack-devel] Finding Default InstallationDirectory for Programsunder Windows


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/3d7e5b11/attachment.html 


More information about the izpack-devel mailing list