From 256de48f601e9b89f13f79f1a2119141c12c4bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Mon, 13 May 2013 16:30:13 +0000 Subject: [PATCH] Location of Windows folder was Harcoded previously. Now it is fixed (thanks to Virginio) --- rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java b/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java index d89699ae..a2e46204 100644 --- a/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java +++ b/rdptransport/java/src/es/virtualcable/rdp/WindowsApplet.java @@ -10,7 +10,7 @@ import es.virtualcable.rdp.util; public class WindowsApplet implements OsApplet { - private static final String MSTSC_CMD = "c:\\windows\\system32\\mstsc.exe"; + private static final String MSTSC_CMD_REL = "\\system32\\mstsc.exe"; private Hashtable params; private String scrWidth; @@ -108,6 +108,7 @@ public class WindowsApplet implements OsApplet { private void executeTunnel() throws IOException { String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java.exe"; + String MSTSC_CMD = System.getenv("SystemRoot") + MSTSC_CMD_REL; String [] cmd = { java, "-jar", jarFileName, tunPort, MSTSC_CMD, rdpFileName }; ProcessBuilder pb = new ProcessBuilder( cmd ); Map env = pb.environment(); @@ -120,6 +121,7 @@ public class WindowsApplet implements OsApplet { private void executeDirect() throws IOException { + String MSTSC_CMD = System.getenv("SystemRoot") + MSTSC_CMD_REL; Runtime.getRuntime().exec( MSTSC_CMD + " \"" + rdpFileName + "\"" ); }