user339160
user339160

Reputation:

How to use msiexec.exe to remove a Windows installer

We have a Windows installer package, sample.msi. To install the package we are using

msiexec /i sample.exec /qr 

To uninstall the same package, the below code is used.

msiexec /x sample.exec /qr 

When we use /x it deletes all the files in the associated directory which is created. We want to retain all the contents in the directory. How is that possible?

Upvotes: 1

Views: 802

Answers (1)

Bogdan Mitrache
Bogdan Mitrache

Reputation: 11023

By default, Windows Installer removes all the files installed by the package, except the ones created after the installation finished. If you want to keep the files installed after uninstall the most simple solution is to mark their components as permanent, in the Component table.

Upvotes: 2

Related Questions