mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-23 14:46:49 +03:00
Fixed terminal windows popup in Win7.
This commit is contained in:
parent
fdf746187e
commit
4992c09b61
@ -156,6 +156,10 @@ function windows_terminal() {
|
|||||||
if (this._kernel32.SetConsoleScreenBufferSize(this._stdoutput, coordScreen.Deref(0, 4).toBuffer().readUInt32LE()).Val == 0) {
|
if (this._kernel32.SetConsoleScreenBufferSize(this._stdoutput, coordScreen.Deref(0, 4).toBuffer().readUInt32LE()).Val == 0) {
|
||||||
throw ('Failed to set Console Buffer Size');
|
throw ('Failed to set Console Buffer Size');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide the console window
|
||||||
|
this._user32.ShowWindow(this._kernel32.GetConsoleWindow().Val, SW_HIDE);
|
||||||
|
|
||||||
this.ClearScreen();
|
this.ClearScreen();
|
||||||
this._hookThread().then(function () {
|
this._hookThread().then(function () {
|
||||||
// Hook Ready
|
// Hook Ready
|
||||||
@ -203,7 +207,7 @@ function windows_terminal() {
|
|||||||
};
|
};
|
||||||
this._stop = function () {
|
this._stop = function () {
|
||||||
if (this.stopping) { return (this.stopping); }
|
if (this.stopping) { return (this.stopping); }
|
||||||
console.log('Stopping Terminal...');
|
//console.log('Stopping Terminal...');
|
||||||
this.stopping = new promise(function (res, rej) { this._res = res; this._rej = rej; });
|
this.stopping = new promise(function (res, rej) { this._res = res; this._rej = rej; });
|
||||||
|
|
||||||
var threadID = this._kernel32.GetThreadId(this._user32.SetWinEventHook.async.thread()).Val;
|
var threadID = this._kernel32.GetThreadId(this._user32.SetWinEventHook.async.thread()).Val;
|
||||||
@ -458,7 +462,7 @@ function windows_terminal() {
|
|||||||
function LOWORD(val) { return (val & 0xFFFF); }
|
function LOWORD(val) { return (val & 0xFFFF); }
|
||||||
function HIWORD(val) { return ((val >> 16) & 0xFFFF); }
|
function HIWORD(val) { return ((val >> 16) & 0xFFFF); }
|
||||||
function GetEsc(op, args) { return (Buffer.from('\x1B[' + args.join(';') + op)); }
|
function GetEsc(op, args) { return (Buffer.from('\x1B[' + args.join(';') + op)); }
|
||||||
//function MeshConsole(msg) { require('MeshAgent').SendCommand({ "action": "msg", "type": "console", "value": JSON.stringify(msg) }); }
|
function MeshConsole(msg) { require('MeshAgent').SendCommand({ "action": "msg", "type": "console", "value": JSON.stringify(msg) }); }
|
||||||
function TranslateLine(x, y, data, attributes) {
|
function TranslateLine(x, y, data, attributes) {
|
||||||
var i, fcolor, bcolor, rcolor, fbright, bbright, lastAttr, fc, bc, rc, fb, bb, esc = [], output = [GetEsc('H', [y, x])];
|
var i, fcolor, bcolor, rcolor, fbright, bbright, lastAttr, fc, bc, rc, fb, bb, esc = [], output = [GetEsc('H', [y, x])];
|
||||||
if (typeof attributes == 'number') { attributes = [ attributes ]; } // If we get a single attribute, turn it into an array.
|
if (typeof attributes == 'number') { attributes = [ attributes ]; } // If we get a single attribute, turn it into an array.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.2.4-z",
|
"version": "0.2.5-a",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
Loading…
Reference in New Issue
Block a user