Dépôt officiel du code source de l'ERP OpenConcerto
/trunk/OpenConcerto/src/org/jopendocument/link/OOInstallation.java |
---|
102,10 → 102,14 |
rootPaths.addAll(Arrays.asList(loRootPaths)); |
rootPaths.addAll(Arrays.asList(ooRootPaths)); |
} |
for (final String p : rootPaths) { |
if (DesktopEnvironment.test("reg", "query", p)) |
// On force à chercher dans le registre 64 bits sinon il va chercher dans le registre 32 |
// bits si os 64b et VM 32b |
if (DesktopEnvironment.test("reg", "query", p, "/reg:64")) |
return p; |
} |
return null; |
} |
123,7 → 127,8 |
// all string values for the passed registry path |
private static Map<String, String> getStringValues(final String path, final String option) throws IOException { |
final Map<String, String> values = new HashMap<String, String>(); |
final String out = DesktopEnvironment.cmdSubstitution(Runtime.getRuntime().exec(new String[] { "reg", "query", path, option })); |
// On force /reg:64 (utile si on utilise une VM 32 avec un systeme 64 bits) |
final String out = DesktopEnvironment.cmdSubstitution(Runtime.getRuntime().exec(new String[] { "reg", "query", path, option, "/reg:64" })); |
final Matcher matcher = stringValuePattern.matcher(out); |
while (matcher.find()) { |
values.put(matcher.group(1), matcher.group(2)); |