diff --git a/meshconsole/main.c b/meshconsole/main.c index 3a88b27..5572866 100644 --- a/meshconsole/main.c +++ b/meshconsole/main.c @@ -307,12 +307,12 @@ char* crashMemory = ILib_POSIX_InstallCrashHandler(argv[0]); if (argv[1][8] == '*') { // New Style - integratedJavaScriptLen = sprintf_s(integratedJavaScript, 1024, "require('agent-installer').update(false, '%s');", argc > 1 ? argv[2] : "null"); + integratedJavaScriptLen = sprintf_s(integratedJavaScript, 1024, "require('agent-installer').update(false, '%s');", argc > 2 ? argv[2] : "null"); } else { // Legacy - integratedJavaScriptLen = sprintf_s(integratedJavaScript, 1024, "require('agent-installer').update(false, ['%s']);", argv[2]); + integratedJavaScriptLen = sprintf_s(integratedJavaScript, 1024, "require('agent-installer').update(false, ['%s']);", argc > 2 ? argv[2] : ""); } } } diff --git a/meshcore/KVM/Windows/input.c b/meshcore/KVM/Windows/input.c index 12ad366..9579c3b 100644 --- a/meshcore/KVM/Windows/input.c +++ b/meshcore/KVM/Windows/input.c @@ -381,9 +381,7 @@ void KeyActionUnicode(WORD unicode, int up) key.type = INPUT_KEYBOARD; key.ki.wVk = 0; key.ki.dwFlags = KEYEVENTF_UNICODE; - if (up == 1) key.ki.dwFlags = KEYEVENTF_KEYUP; // 1 = UP - else if (up == 3) key.ki.dwFlags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP; // 3 = EXUP - else if (up == 4) key.ki.dwFlags = KEYEVENTF_EXTENDEDKEY; // 4 = EXDOWN + if (up == 1) key.ki.dwFlags |= KEYEVENTF_KEYUP; // 1 = UP key.ki.time = 0; key.ki.wScan = unicode; key.ki.dwExtraInfo = GetMessageExtraInfo(); diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 78be835..18df0e6 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -5612,7 +5612,7 @@ int MeshAgent_Start(MeshAgentHostContainer *agentHost, int paramLen, char **para } else { - sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "%s -update:*%s %s", updateFilePath, agentHost->JSRunningAsService != 0 ? "S" : "C", startParms == NULL ? "" : (char*)ILibMemory_Extra(startParms)); + sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "%s -update:*%s %s", updateFilePath, agentHost->JSRunningAsService != 0 ? "S" : "C", startParms == NULL ? "W10=" : (char*)ILibMemory_Extra(startParms)); } if (agentHost->logUpdate != 0) { ILIBLOGMESSAGEX("SelfUpdate[%d] -> CreateProcessW() with parameters: %s", agentHost->updaterVersion, ILibScratchPad); } if (!CreateProcessW(NULL, ILibUTF8ToWide(ILibScratchPad, -1), NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &info, &processInfo)) diff --git a/meshcore/meshdefines.h b/meshcore/meshdefines.h index 8b34133..171bff7 100644 --- a/meshcore/meshdefines.h +++ b/meshcore/meshdefines.h @@ -25,7 +25,7 @@ typedef enum RemoteManagementCommands { MNG_KVM_NOP = 0, MNG_KVM_KEY = 1, - MNG_KVM_KEY_WITHLAYOUT = 85, + MNG_KVM_KEY_UNICODE = 85, MNG_KVM_MOUSE = 2, MNG_KVM_MOUSE_CURSOR = 88, MNG_KVM_MOUSE_MOVE = 89, diff --git a/meshservice/ServiceMain.c b/meshservice/ServiceMain.c index f4d91fa..dcc218d 100644 --- a/meshservice/ServiceMain.c +++ b/meshservice/ServiceMain.c @@ -719,7 +719,7 @@ int wmain(int argc, char* wargv[]) if (argv[1][8] == '*') { // New Style - updateLen = sprintf_s(update, 1024, "require('agent-installer').update(%s, '%s');", argv[1][9] == 'S' ? "true" : "false", argc > 1 ? argv[2] : "null"); + updateLen = sprintf_s(update, 1024, "require('agent-installer').update(%s, '%s');", argv[1][9] == 'S' ? "true" : "false", argc > 2 ? argv[2] : "null"); } else {