mirror of https://github.com/ospab/ostp.git
Reported from v0.4.3: a consent prompt for schtasks, then 10-20 console windows opening and closing, then STILL a prompt for the helper. Two defects of mine, both in the change that was supposed to remove the repeated prompt. Registration never succeeded. ShellExecuteW returns as soon as the elevated process is LAUNCHED, not when it finishes, so the generated XML was deleted while schtasks was still starting — it then had nothing to read. The task was never created, so the code fell through to the direct elevated launch and the user paid for two prompts to get what one used to do. Registration now goes through PowerShell's Start-Process -Verb RunAs -Wait -PassThru, which actually waits, lets the XML be deleted safely afterwards, and surfaces the real exit code instead of it being inferred by polling. Arguments are passed as an array, so the task name and XML path never touch a command line; verified the generated script parses with a path containing an apostrophe, an ampersand and spaces at once. The flashing was every schtasks/reg/tasklist invocation: the GUI is a windowed-subsystem binary, so each console child pops a window, and the registration polled up to twenty times in a row. All of them now go through a wrapper that sets CREATE_NO_WINDOW. This also silences flashes that predate this feature — `tasklist` runs whenever the exclusions screen opens, and `reg` on autostart changes. Polling is gone with it: the exit code is authoritative, and the task's presence is confirmed once rather than up to twenty times. Also drops shell_execute_elevated, which this change had left with no callers. |
||
|---|---|---|
| .. | ||
| src | ||
| src-tauri | ||
| .gitignore | ||
| README.md | ||
| build_dist.js | ||
| package-lock.json | ||
| package.json | ||
README.md
Tauri + Vanilla
This template should help get you started developing with Tauri in vanilla HTML, CSS and Javascript.