Add helper script to the distribution - #1945
Conversation
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wborn
left a comment
There was a problem hiding this comment.
This PR is being reviewed with AI first.
The overall approach looks good: shipping runhidden.vbs as part of the distribution avoids creating the helper dynamically in %TEMP% and removes the associated timing, permission, path, and cleanup concerns.
One correctness issue should be addressed before merging: when runhidden.vbs is missing, the new error path exits after cache-refresh-lock has already been created. That stale lock causes subsequent startups to skip the cache refresh path entirely, including the helper-file check.
Apart from that issue, no further problems were found in the current changes. A human maintainer review is still needed.
In #1922 we fixed the 'Terminal has been closed' error. The solution for Windows requires a helper Visual Basic Script file that executes some shell commands in a hidden window in order to avoid confusing users. The original solution created the helper VBS file on the fly in the Windows
tempfolder. However as reported and discussed in #1940 creating the script on the fly can create problems; specifically due to paths with spaces. And it leaves an orphan copy of the script file in the Windowstempfolder.In this PR we no longer create the helper Visual Basic Script on the fly, but instead we include it as a fixed part of the distribution. Furthermore the batch file and the script are modified to handle paths with spaces.
Resolves #1940
Signed-off-by: Andrew Fiddian-Green software@whitebear.ch