mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
fix(installer): a path-less computer-use driver no longer blocks an install or update
The running-copy check matched processes whose path it could not read by name, and the name list included cua-driver.exe, which other computer-use apps ship too. An elevated or orphaned driver from another app therefore read as Studio still running, and the retry loop could never succeed. Only the app's own executable and its host are matched by name now.
This commit is contained in:
1 parent
863575ebf7
commit
f1bbea3885
2 files changed
+9
-1
No files matched your search
@@ -129,7 +129,7 @@
|
||||
!macro rxScript
|
||||
FileOpen $0 "$PLUGINSDIR\rxclose.ps1" w
|
||||
FileWrite $0 "param([string]$$Dir, [string]$$Mode, [int]$$Self)$\r$\n"
|
||||
FileWrite $0 "$$names = @('${APP_EXECUTABLE_FILENAME}', 'reasonix-studio-host.exe', 'cua-driver.exe')$\r$\n"
|
||||
FileWrite $0 "$$names = @('${APP_EXECUTABLE_FILENAME}', 'reasonix-studio-host.exe')$\r$\n"
|
||||
FileWrite $0 "$$hit = @(Get-CimInstance -ClassName Win32_Process | ? { $$_.ProcessId -ne $$Self -and (($$_.Path -and $$_.Path.StartsWith($$Dir, 'CurrentCultureIgnoreCase')) -or (-not $$_.Path -and $$names -contains $$_.Name)) })$\r$\n"
|
||||
FileWrite $0 "if ($$Mode -eq 'find') { if ($$hit.Count -gt 0) { exit 0 } else { exit 1 } }$\r$\n"
|
||||
FileWrite $0 "$$hit | % { Stop-Process -Id $$_.ProcessId -Force -ErrorAction SilentlyContinue }$\r$\n"
|
||||
|
||||
@@ -3932,3 +3932,11 @@ test("a pick arms the page, answers what it reports, and a page that cannot answ
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test("the installer's by-name fallback for a process it cannot read the path of never names the shared computer-use driver", () => {
|
||||
const nsh = fs.readFileSync(new URL("../assets/installer.nsh", import.meta.url), "utf8");
|
||||
const listed = /\$\$names = @\(([^)]*)\)/.exec(nsh)?.[1] ?? "";
|
||||
assert.ok(listed.includes("${APP_EXECUTABLE_FILENAME}"), "the app's own executable is matched by name");
|
||||
assert.ok(listed.includes("reasonix-studio-host.exe"), "the shell's own host is matched by name");
|
||||
assert.ok(!listed.includes("cua-driver.exe"), "other computer-use apps ship the same driver name, so a path-less one is not ours");
|
||||
});
|
||||
Reference in new issue
Block a user