mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
Location of Windows folder was Harcoded previously. Now it is fixed (thanks to Virginio)
This commit is contained in:
parent
174106530c
commit
256de48f60
@ -10,7 +10,7 @@ import es.virtualcable.rdp.util;
|
|||||||
|
|
||||||
public class WindowsApplet implements OsApplet {
|
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<String,String> params;
|
private Hashtable<String,String> params;
|
||||||
private String scrWidth;
|
private String scrWidth;
|
||||||
@ -108,6 +108,7 @@ public class WindowsApplet implements OsApplet {
|
|||||||
private void executeTunnel() throws IOException
|
private void executeTunnel() throws IOException
|
||||||
{
|
{
|
||||||
String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java.exe";
|
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 };
|
String [] cmd = { java, "-jar", jarFileName, tunPort, MSTSC_CMD, rdpFileName };
|
||||||
ProcessBuilder pb = new ProcessBuilder( cmd );
|
ProcessBuilder pb = new ProcessBuilder( cmd );
|
||||||
Map<String,String> env = pb.environment();
|
Map<String,String> env = pb.environment();
|
||||||
@ -120,6 +121,7 @@ public class WindowsApplet implements OsApplet {
|
|||||||
|
|
||||||
private void executeDirect() throws IOException
|
private void executeDirect() throws IOException
|
||||||
{
|
{
|
||||||
|
String MSTSC_CMD = System.getenv("SystemRoot") + MSTSC_CMD_REL;
|
||||||
Runtime.getRuntime().exec( MSTSC_CMD + " \"" + rdpFileName + "\"" );
|
Runtime.getRuntime().exec( MSTSC_CMD + " \"" + rdpFileName + "\"" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user