Review of c24cd1f: with a user-owned parent (Desktop), the user could swap the chosen folder for a junction
to a protected folder after secure-dir Prepare, and the elevated Finish would grant Users modify on the
target's config\ etc. Any elevated path operation on a user-controlled path has this race, so the elevated
installer now only works in Program Files.
- VoiceChanger.iss: {app} is always {commonpf}\VoiceChanger (apo\, scripts\mic-apo.ps1, scripts\deploy.ps1,
uninstall\, payload\). The user's folder comes from a custom page (/DATADIR=, previous DataDir, or the
v1.0.x App Path) and is only read for checks. deploy.ps1 runs with ExecAsOriginalUser: copies payload,
moves data folders of an older install, runs install.ps1. Shortcuts are created after the copy
(CreateShellLink; [Icons] made empty-target links) and the postinstall launch runs as the original user.
Uninstall restores the mic settings and removes Program Files only; the user's folder is left (message).
- legacy.ps1 (replaces secure-dir.ps1): for a v1.0.0/1.0.1 folder (admin-locked, uninstall\ inside) deletes the
old executable parts by name, moves the mic backup to Program Files and renames the folder to <dir>.old,
only if no non-admin principal can delete/rename the folder or any ancestor (owner + ACL check; ACLs can
only be changed by admins, so the check stays valid during the operation). Otherwise refuses (exit 20).
- deploy.ps1 (user level): refuses a junction; a v1.0.2 admin-locked folder under a user-owned parent is
renamed aside by the user and its data folders moved into a fresh folder.
- mic-apo.ps1: back to its pre-c24cd1f logic (no -From); header documents the Program Files root.
Windows 11 VM, Inno 6.7.4, AppVersion 1.0.3:
- J: chosen folder = junction to admin-owned C:\vctarget (config\keep.txt, protected ACL): setup exit 0,
legacy exit 0, deploy exit 31; target files + SDDL unchanged after setup, after limited-token deploy
(exit 31), after limited-token write/icacls/rename attempts (all denied), and after uninstall.
- J2: same target with uninstall\unins000.exe: legacy exit 20, setup aborted (exit 7), target unchanged.
- U1: v1.0.1 at C:\VoiceChanger -> 1.0.3 with the default folder: legacy exit 1, backup moved byte-equal,
models\mine.txt kept, C:\VoiceChanger.old removed, APO from Program Files; uninstall restores FxProperties.
- U2: v1.0.2 on Desktop -> limited-token deploy renamed it aside, moved models, new folder owned by the user;
1.0.3 setup on it exit 0; uninstall restores FxProperties, folder and models kept.
- D: fresh Desktop install with full engine download: deploy exit 0, admin_root = Program Files,
audiodg loads the Program Files DLL, APO 440 Hz + Communications PASS, Start menu/desktop shortcuts point
at <Desktop>\VoiceChanger\VoiceChanger.exe and are removed on uninstall.
- python unittest: 16 run, 2 skipped (tkinter missing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>