Aumentando a visibilidade de alguns campos para permitir que os mesmos sejam
acessados de alguma classe descendente (painel personalizado).
Bug: 1041

Registry updates using $OLD_KEY_VALUE can break Windows PATH.

Workaround:

--- a/izpack-installer/src/main/java/com/izforge/izpack/util/os/Win_RegistryHandler.java
+++ b/izpack-installer/src/main/java/com/izforge/izpack/util/os/Win_RegistryHandler.java
@@ -22,6 +22,12 @@

 package com.izforge.izpack.util.os;

+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
 import com.coi.tools.os.izpack.Registry;
 import com.coi.tools.os.win.RegDataContainer;
 import com.izforge.izpack.api.exception.NativeLibException;
@@ -30,9 +36,6 @@ import com.izforge.izpack.core.os.RegistryHandler;
 import com.izforge.izpack.core.substitutor.VariableSubstitutorImpl;
 import com.izforge.izpack.util.Librarian;

-import java.util.List;
-import java.util.Properties;
-
 /**
  * This is the Microsoft Windows specific implementation of <code>RegistryHandler</code>.
  *
@@ -90,6 +93,23 @@ public class Win_RegistryHandler extends RegistryHandler
                 {
                     // ignore
                 }
+                if(key.equals("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment") && value.equals("PATH")) {
+                    String[] subPaths = contents.split(";");
+                    List<String> fixedSubPaths = new ArrayList<String>();
+                    for (String subPath : subPaths) {
+                        if (subPath.length() > 0 && !fixedSubPaths.contains(subPath)) {
+                            fixedSubPaths.add(subPath);
+                        }
+                    }
+                    StringBuilder fixedContents = new StringBuilder();
+                    if ( fixedSubPaths.size() > 0 ) {
+                        fixedContents.append(fixedSubPaths.get(0));
+                        for (int i = 1 ; i < fixedSubPaths.size() ; i++) {
+                            fixedContents.append(";").append(fixedSubPaths.get(i));
+                        }
+                    }
+                    contents = fixedContents.toString();
+                }
             }
         }
         getRegistry().setValue(key, value, contents);

Link: https://jira.codehaus.org/browse/IZPACK-1041