I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4783b09f authored by hypercubus's avatar hypercubus Committed by zzz
Browse files

fixed bug in IE launch

parent 15c089ca
No related branches found
No related tags found
No related merge requests found
...@@ -65,27 +65,27 @@ public class UrlLauncher { ...@@ -65,27 +65,27 @@ public class UrlLauncher {
} else if (osName.startsWith("Windows")) { } else if (osName.startsWith("Windows")) {
String browserString = "\"C:\\Program Files\\Internet Explorer\\iexplore.exe\""; String browserString = "\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome";
BufferedReader bufferedReader = null; BufferedReader bufferedReader = null;
_shellCommand.executeSilentAndWaitTimed("regedit /E default_browser.reg \"HKEY_CLASSES_ROOT\\http\\shell\\open\\command\"", 5); _shellCommand.executeSilentAndWait("regedit /E browser.reg \"HKEY_CLASSES_ROOT\\http\\shell\\open\\command\"");
try { try {
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream("default_browser.reg"))); bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream("browser.reg"), "UTF-16"));
for (String line; (line = bufferedReader.readLine()) != null; ) { for (String line; (line = bufferedReader.readLine()) != null; ) {
if (line.startsWith("@=\"")) { if (line.startsWith("@=")) {
browserString = line.substring(3, line.toLowerCase().indexOf(".exe") + 3); browserString = "\"" + line.substring(3, line.toLowerCase().indexOf(".exe") + 4) + "\"";
} }
} }
try {
bufferedReader.close();
} catch (IOException e) {
// No worries.
}
new File("browser.reg").delete();
} catch (Exception e) { } catch (Exception e) {
// Defaults to IE. // Defaults to IE.
} }
try {
bufferedReader.close();
} catch (IOException e) {
// No worries.
}
new File("default_browser.reg").delete();
if (_shellCommand.executeSilentAndWaitTimed(browserString + " " + url, 5)) if (_shellCommand.executeSilentAndWaitTimed(browserString + " " + url, 5))
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment