@opencrater/sdk 0.8.51 → 0.8.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @opencrater/sdk might be problematic. Click here for more details.
- package/dist/paint.js +2 -2
- package/package.json +1 -1
package/dist/paint.js
CHANGED
|
@@ -351,7 +351,7 @@ function spawnWindowsConsoleSink() {
|
|
|
351
351
|
pdebug("spawning pump:", exe);
|
|
352
352
|
const child = child_process.spawn(exe, ["-NoProfile", "-NonInteractive", "-EncodedCommand", b64], {
|
|
353
353
|
stdio: ["pipe", "pipe", errStdio],
|
|
354
|
-
windowsHide:
|
|
354
|
+
windowsHide: true
|
|
355
355
|
});
|
|
356
356
|
child.on("error", (e) => pdebug("pump spawn error:", exe, "-", e.message));
|
|
357
357
|
child.on("exit", (code) => pdebug("pump process exited code", code, "pid", child.pid));
|
|
@@ -430,7 +430,7 @@ function spawnWindowsConsoleSink() {
|
|
|
430
430
|
function wmiSpawnDetached(cmdLine) {
|
|
431
431
|
try {
|
|
432
432
|
const esc = cmdLine.replace(/'/g, "''");
|
|
433
|
-
const ps = `$ErrorActionPreference='Stop';try{$r=Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine='${esc}'};if($r.ReturnValue -eq 0){[Console]::Out.Write('OCPID '+$r.ProcessId)}else{[Console]::Out.Write('OCERR rv='+$r.ReturnValue)}}catch{[Console]::Out.Write('OCERR '+$_.Exception.Message)}`;
|
|
433
|
+
const ps = `$ErrorActionPreference='Stop';try{$su=New-CimInstance -ClassName Win32_ProcessStartup -ClientOnly -Property @{CreateFlags=[uint32]134217728;ShowWindow=[uint16]0};$r=Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine='${esc}';ProcessStartupInformation=$su};if($r.ReturnValue -eq 0){[Console]::Out.Write('OCPID '+$r.ProcessId)}else{[Console]::Out.Write('OCERR rv='+$r.ReturnValue)}}catch{[Console]::Out.Write('OCERR '+$_.Exception.Message)}`;
|
|
434
434
|
const b64 = Buffer.from(ps, "utf16le").toString("base64");
|
|
435
435
|
const res = child_process.spawnSync(
|
|
436
436
|
powershellPath(),
|