WinAppMigrator

Undoing an Install

There are two ways an install is undone:

Both work from the same record, the install's journal. Before each change, the installer writes down what it is about to replace. Undoing goes through that record backward.

Where to Find It

An app installed this way has its own entry in Windows Settings:

The entry shows the app's name, and its publisher and version if the installer had them. It has no Modify or Repair, only Uninstall, because there is nothing to change or repair.

The entry runs this project's own uninstaller, not the app's original one. The app's own uninstaller from the old PC is not used, and would not work here.

Windows shows the UAC prompt first, saying Unknown publisher. The uninstaller is never signed, even when the installer was. That is on purpose: see Privacy and security. It is kept in a folder only administrators can change, which is what makes that safe.

Settings itself has not been clicked by the project's tests. They run the same command the entry holds. See Requirements and testing.

The Uninstaller's Window

The window is titled "Uninstall" and the app's name, with "Undoes what its installer did" under it. It says "Reading the record of this install…" for a moment while it checks the record.

What Will Be Removed

This card lists:

Under it, a note sums up what stays, for example:

Files you added or changed stay, with the folders they are in. 12 files this install replaced come back, or go beside a file that has changed since. Runtimes it installed stay, because other programs may use them: Microsoft Visual C++ Redistributable (x64).

Options

If the install restored any user data or license data, an Options card offers one box, Also Remove User Data and License Data. It starts unticked. Its note says how many items that is, and: "They stay unless this is on. What they replaced comes back, or goes beside them if they have changed since."

Uninstall

Click Uninstall to go ahead, or Cancel to close without changing anything. While it works, the bottom shows "Undoing the install" with a count and a progress bar. The window cannot be closed while it runs, because undoing has no good place to stop.

The Result

Message What it means
"The app was uninstalled." Everything the install did is undone, except runtimes it installed, which stay and are listed under Left in Place.
"The app was uninstalled, except for what is listed below." Some things were left in place, on purpose. See the list.
"Part of it is on a drive that is not connected. Connect it, and uninstall again from Settings." Some of the install is on a drive that is not there now. The entry in Settings stays, so you can finish later.
"Not all of it could be undone. Close what is using it, and uninstall again from Settings." Something was in use, or could not be changed. The entry stays. The red lines say what, and Log gives the path of the log.

Three tiles count what was Undone, what was Left in Place, and what Could Not Be Undone. The Left in Place card lists what stayed and why, up to 30, then "and" how many more. Close closes the window. When the uninstall has finished, the uninstaller removes its own folder once its window is closed.

What Comes Back, and What Stays

The uninstaller undoes only what the install did, and only where it is still as the install left it.

Thing What happens
A file the install added, still as it was installed It is deleted.
A file the install added, that has changed since It stays, and is listed.
A file you added to the app's folders It stays, with the folders it is in.
A file the install replaced It comes back, if the file over it is still as installed. If that file has changed since, the original goes beside it, named like settings.ini.before-install. The uninstaller never throws it away.
A registry value or environment variable It is put back as it was, if it still holds what the install wrote. If something else has changed it since, it stays as it is now.
Path Only the entries the install added come out.
A service or scheduled task It is stopped and removed, if it still runs what was installed. A service that will not stop is marked for removal, and Windows removes it when the PC restarts or whatever has it open lets go. The project's tests have not run a restart.
A file that a kept service, task, or value still uses It stays with it.
A folder It is removed if it is empty.
User data and license data They stay, unless you tick Also Remove User Data and License Data. If one replaced a file that was there before, and you have not changed it since, the earlier file comes back. If you have changed it, both stay.
A runtime the install added It stays, because other programs may use it. This is also true after a rollback.
A service that ran as a custom account It does not get its password back, because the password was never in the installer.

The .before-install Copies

When the install replaced a file, it kept the original in its record. On uninstall, if you have changed the replacing file since, the uninstaller does not throw your change away. It leaves your file where it is, and puts the original beside it with .before-install added to the name. You can compare the two and keep whichever you want.

An Install over Another

If you install an app over an earlier install of it, uninstalling the later one brings the earlier one back, with its own entry in Settings.

Uninstalling Without a Window

For a script, or a PC without Direct3D 12, the uninstaller runs with no window:

& "C:\ProgramData\WinAppMigrator\installs\wam-abc123\uninstall.exe" --uninstall wam-abc123 --quiet | Out-String
$LASTEXITCODE

Run it from an administrator's PowerShell. wam-abc123 stands for the install's id. The installer prints the id when it installs from a command line, and the entry in Settings holds the whole command, as its QuietUninstallString. Add --remove-user-data to remove user data and licenses too, and --log with a new file name to keep a copy of the log. The exit code is 0 when it finished, 1 when anything could not be undone or it could not start, and 2 if a flag is wrong.

If the uninstaller's window cannot open, it shows a message with this same command, filled in for that install.

The details are in Command line.

If It Cannot Finish

The rules undoing follows are in SECURITY.md.

Last changed 2026-11-11. Describes WinAppMigrator as of its latest release, 0.6.0.