I've an application(MSI) and provided an xml file to copy to Appdata\appname\config folder. requested me to uninstall the old version before installing the new version. As it is a vendor MSI it automatically removes the older version. But propbelm is that uninstallation of old version leave the old properties.xml file and some registrys as it is which causes problem for my new version to replace the old ones.

I know about RD command but this will not work to remove the properties.xml file which is in appdata. Please help me how to  remove the old version cleanly.

0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



The cleanest solution imo would be to modify the new installation to account for the changes needed.

It is very common for some files/reg settings to be left behind after uninstall, usually this is because the msi didn't install the file (exe created file on launch) or files are in the user profile which only would be removed if that same user uninstalled the application.

Some ways to handle this type of stuff

  • RemoveFiles/Registry tables... these are very handy because in most msi the remove files/table action comes before install actions so they can be removed before the install puts the new one down.  I always try this first.
  • Could use some sort of CA script for the files/reg you need to remove
  • If using installshield, could use the xml edit features to handle the changes needed.
  • Version the file in the Files table, this will force the msi to overwrite the file (if version is higher obviously).
For user profile data, the setup is the same, you just have to make sure the shortcut is advertised to kick off a repair OR use active setup to ensure your logic/actions is run for every user.
Answered 05/29/2013 by: dandirk
Third Degree Green Belt

Please log in to comment

Use RemoveFile table and add the entry of this file there.

Also add the new file in the folder. In the same component add a HKCU registry key and make it keypath. When you will run your advertised shortuct the application will repair and will delete the old file and add this new one.

Answered 05/30/2013 by: piyushnasa
Red Belt

  • Big fan of removefiles table +1
Please log in to comment

I guess by AppData, this is in the profile? If so, read on.

You will need to add a few registry entries into your package to delete keys on install, this will clean up the mess left behind from the old version.

With the XML file, just add a version to the file in the File Table, make sure it higher than the old file and it should over write it. Make a key path for the file in the registry so it gets checked on launch through an advertised shortcut.

Answered 05/29/2013 by: rileyz
Red Belt

Please log in to comment

in former times I would have suggested MSIZAP from MS, but this nice tool was discontinued.

Currently this seems to be the only solutions, if you don't want to fix your Registry by hand.


Always backup the MSI for the software you installed, so this should not needed anymore.

Answered 05/29/2013 by: Nico_K
Red Belt

Please log in to comment