Have you tried to upgrade or uninstall PowerToys, but got halted by an error indicating that the file PowerToysSetup-<version>-x64.msi is unavailable?
This guide provides a structured methodology to troubleshoot and resolve this issue, enabling a complete and clean uninstall of the PowerToys application.
Preliminary Step: Verification and Reinstallation
The most straightforward initial approach is to verify the integrity of the installation source. The error is often rectified by simply providing the Windows Installer with the correct package.
- Download the PowerToys Installer: Navigate to the official GitHub repository at https://github.com/microsoft/PowerToys/releases and obtain the installer executable (.exe) that corresponds to the version currently installed on your system.
- Execute the Installer: Run the downloaded file. The installer interface may present options to "Modify," "Repair," or "Uninstall." Selecting "Uninstall" at this stage frequently resolves the issue, as the fresh executable contains the necessary logic and files to conduct a proper removal.
Should this preliminary step prove unsuccessful, a more advanced, hands-on procedure is required.
Step 1: Determining the Installation Scope
The subsequent troubleshoot steps are influenced by the installation scope of the application—whether it was deployed for a single user or for all users on the machine. This determines the file paths and potential administrative privileges required for removal.
Check Installation Path
You can determine if PowerToys is installed per-user or machine-wide by checking the installation path. The installation type also affects whether the application requires administrative privileges to function fully.
The most efficient method for checking the installation scope is to examine the location of the primary PowerToys executable files:
- Per-user installation: The application is installed within the user's local application data folder. The expected path is
%LOCALAPPDATA%\PowerToys\. - Machine-wide installation: The application is installed in the standard Program Files directory. The expected path is
%ProgramFiles%\PowerToys\.
Verification can be performed by opening File Explorer and navigating to these locations. The presence of the PowerToys application directory and its executables at one of these paths will confirm the installation type.
Step 2: Extracting the MSI Package from the Installer
As the core issue is the absence of the MSI file, the solution involves extracting it directly from the downloaded PowerToys installer executable. The following methods are recommended.
Method A: Utilizing the Built-in Extraction Command
The modern PowerToys installer includes integrated functionality for this purpose.
- Ensure you have the correct PowerToys installer
.exedownloaded from the releases page. - Open a Terminal or PowerShell window with administrative privileges.
- Using the command line, navigate to the directory containing the downloaded installer.
- Execute the following command, replacing
<version>with the pertinent version number:.\PowerToysSetup-<version>-x64.exe --extract_msi
This command will output the required MSI installer into the current directory, which can then be used to proceed with the uninstallation.
Method B: Employing the WiX Toolset for Extraction
If the integrated command does not yield the desired result, the Windows Installer XML (WiX) toolchain provides a reliable alternative.
- Acquire the wix314-binaries.zip package.
- Extract the contents of this package into the same directory as the PowerToys installer executable. This provides access to the
dark.exeutility. - From an administrative command prompt within that directory, run the following command, substituting the appropriate paths:
dark.exe -x OUTPUT_FOLDER INSTALLER_PATHFor example:.\dark.exe -x C:\ExtractedMSI .\PowerToysSetup-<version>-x64.exe
This process will decompress the installer and generate the necessary PowerToysSetup-<version>-x64.msi file within your specified output folder.
Step 3: Executing the Uninstallation
With the MSI file successfully extracted, you may now complete the removal process.
Locate the extracted .msi file, right-click on it, and select "Uninstall." Alternatively, you may execute the uninstall via the command line for precision. Open an administrative command prompt, navigate to the directory containing the MSI, and run:
msiexec /x PowerToysSetup-<version>-x64.msi
This command will initiate the Windows Installer service to perform a formal uninstallation of the application, resolving the initial dependency error.
