From ce07adcc0dcedc3eacfd54e4e745fafc19ef0b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Tue, 8 Jul 2014 11:46:01 +0000 Subject: [PATCH] Updated to use alternative opennx if nomachine client not found --- .../src/es/virtualcable/nx/WindowsApplet.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nxtuntransport/src/es/virtualcable/nx/WindowsApplet.java b/nxtuntransport/src/es/virtualcable/nx/WindowsApplet.java index 4175cb182..f0502aba2 100644 --- a/nxtuntransport/src/es/virtualcable/nx/WindowsApplet.java +++ b/nxtuntransport/src/es/virtualcable/nx/WindowsApplet.java @@ -73,6 +73,16 @@ public class WindowsApplet implements OsApplet { } String cmd = WinRegistry.readString(WinRegistry.HKEY_CURRENT_USER, "Software\\Classes\\NXClient.session\\shell\\open\\command", ""); + if ( null == cmd ) + { + // "C:\Program Files (x86)\OpenNX\bin\opennx.exe" --session "%1" + cmd = WinRegistry.readString(WinRegistry.HKEY_CURRENT_USER, "Software\\InnoviData\\OpenNX\\Config", "SystemNxDir"); + if( null != cmd ) + { + cmd = "\"" + cmd + "\\bin\\opennx.exe\" --autologin --session \"%1\""; + } + } + if ( null == cmd ) javax.swing.JOptionPane.showMessageDialog(null, "Can't find Nomachine client. Please, install it"); else