WSABuilds Desktop Utilities
Overview
The standalone desktop utilities live under WSABuilds Utilities/ and are distributed as separate Python scripts plus copied AGPL-3.0 license files. They are intended to be run directly on Windows machines where a WSABuilds-provided Windows Subsystem for Android package may already be installed.
Path responsibilities:
WSABuilds Utilities/Update Script/WSAUpdater.pyis currently only a header/license stub for an updater utility. It declaresWSAUpdaterversion0.0.1aand AGPL-3.0 licensing, but contains no imports, entry point, update logic, UI, package detection, download, or install behavior.WSABuilds Utilities/Update Script/License.txtis the AGPL-3.0 license text paired with the updater script.WSABuilds Utilities/Uninstall Script/WSAUninstaller.pyis the implemented uninstaller. It assumes Windows, administrator privileges, PowerShell, Windows registry access, System Restore, and the AppX/MSIX package identity used by WSA.WSABuilds Utilities/Uninstall Script/License.txtis the AGPL-3.0 license text paired with the uninstaller script.
The update flow is not implemented in the covered code. WSABuilds Utilities/Update Script/WSAUpdater.py does not interact with installed WSABuilds packages or with the user beyond its source comments.
The uninstall flow in WSABuilds Utilities/Uninstall Script/WSAUninstaller.py is procedural and starts at the if __name__ == '__main__' block. Before the main removal logic runs, is_admin() calls ctypes.windll.shell32.IsUserAnAdmin(); if the script is not elevated, it prints Please run this script as an administrator. and exits. Although tkinter and messagebox are imported, the script does not display graphical prompts or confirmations. Its only user interaction is console output for the elevation failure and for individual file, directory, or shortcut deletions.
When elevated, the script calls with_restore_point_creation_frequency(0, main). That helper opens HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore, saves the current SystemRestorePointCreationFrequency value when present, sets it to 0, runs main(), and then restores or deletes the registry value in a finally block. This temporarily disables the normal frequency throttle so main() can create a restore point immediately.
main() first calls create_restore_point("WSABuilds Uninstallation Script Restore Point"), which shells out to PowerShell with Checkpoint-Computer -Description ... -RestorePointType MODIFY_SETTINGS. It then removes the installed MSIX/AppX package by running Get-AppxPackage *MicrosoftCorporationII.WindowsSubsystemForAndroid* | Remove-AppxPackage. This links the utility to any installed package matching the base package name MicrosoftCorporationII.WindowsSubsystemForAndroid, rather than to a version-specific full package name.
After PowerShell package removal, main() performs cleanup of files, registry entries, and shortcuts tied to the package family name MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe. It recursively deletes specific candidate directories from the current user's %LocalAppData%, the system profile package store, C:\ProgramData\Packages, and a likely duplicate WindowsApps alias path. It then walks C:\ProgramData\Microsoft\Windows\WindowsApps and deletes any file or directory whose name contains MicrosoftCorporationII.WindowsSubsystemForAndroid. Finally, it opens HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, deletes subkeys containing MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe, and walks C:\ProgramData\Microsoft\Windows\Start Menu\Programs to remove shortcut files whose resolved path contains that same package family string.
Coupling
- If the WSA package identity changes, update every hard-coded identity in
WSABuilds Utilities/Uninstall Script/WSAUninstaller.py:package_full_name,target_string,dirs_to_check,delete_folders_and_files(), anddelete_registry_folders(). The AppX removal uses the shorterMicrosoftCorporationII.WindowsSubsystemForAndroidmatch, while directory, registry, and shortcut cleanup use the package family suffix_8wekyb3d8bbwe; changing only one form leaves installed artifacts behind. - If the uninstaller is packaged as a desktop app instead of run from a console, verify
WSABuilds Utilities/Uninstall Script/WSAUninstaller.pyuser interaction. The script importstkinter.messageboxbut never uses it, so failed elevation, restore-point failure, or deletion progress will not be shown in a GUI. - If restore-point creation behavior is changed, verify both
with_restore_point_creation_frequency()andcreate_restore_point()inWSABuilds Utilities/Uninstall Script/WSAUninstaller.py. The former edits an HKLM System Restore policy value and assumes it can restore the original state, while the latter raises on a nonzero PowerShell exit before any package removal begins.
Risks
WSABuilds Utilities/Uninstall Script/WSAUninstaller.pydeletes matching directories withshutil.rmtree()and matching files withos.remove()without per-path exception handling. If any package directory under%LocalAppData%,C:\ProgramData\Packages, orC:\ProgramData\Microsoft\Windows\WindowsAppsis locked or permission-denied, the script can abort mid-uninstall after the AppX package has already been removed, leaving partial filesystem, registry, or shortcut cleanup.WSABuilds Utilities/Uninstall Script/WSAUninstaller.pywalksC:\ProgramData\Microsoft\Windows\WindowsAppsand deletes any file or directory whose name containsMicrosoftCorporationII.WindowsSubsystemForAndroid. If another artifact shares that substring but should be retained, the cleanup removes it because there is no manifest or package-owner validation.WSABuilds Utilities/Update Script/WSAUpdater.pyadvertises an updater but has no implementation. Any launcher, shortcut, or documentation that expects this path to update installed WSABuilds packages will do nothing beyond running a comment-only Python file.