* fix(windows): move installer scripts into protected temp directories
Create a private directory under Windows Temp with its final DACL in
CreateDirectoryW. Grant Administrators and SYSTEM full access and use
OWNER RIGHTS to suppress the ordinary creator's implicit WRITE_DAC.
Keep the existing elevated system-cmd copy and SHA-256 verification flow.
Keep auxiliary files in the same directory, report cleanup failures, and
check command length before creating the directory.
This avoids PowerShell, helper executables, and application startup or DLL
linking changes. The Windows Temp parent must retain its standard protection
against deletion by unprivileged users. UAC cancellation can leave an empty
protected directory; the error reports its path.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix(windows): preserve installer results when cleanup fails
Keep the original installer exit code and report remaining temporary directories or inspection errors as warnings with their paths. Include the directory path in creation errors.
Restore the existing handoff assertions in a separate test module, add a locked-directory regression for successful and failed installers, and remove the unrelated ERRORLEVEL environment change.
Validation: scoped formatting and whitespace checks passed. Native cmd probes reproduced the failure before the fix and preserved both exit codes afterwards. No project build or Rust test execution was performed.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix(windows): clarify installer cleanup warnings
Describe protected directories as possibly remaining when cleanup cannot be verified. Remove the cleanup-only test added during review while retaining existing handoff coverage.
Signed-off-by: fufesou <linlong1266@gmail.com>
* test(windows): keep installer handoff tests inline
Restore the inline test module and original helper order to reduce the diff against master. Keep the directory cleanup assertions and original bootstrap checks.
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix(windows): include paths in installer directory check errors
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix(windows): clear inherited ERRORLEVEL before installation
Signed-off-by: fufesou <linlong1266@gmail.com>
* fix(windows): avoid duplicate directory error messages
Signed-off-by: fufesou <linlong1266@gmail.com>
* test(windows): verify installer directory permissions
Signed-off-by: fufesou <linlong1266@gmail.com>
---------
Signed-off-by: fufesou <linlong1266@gmail.com>