If you want to extract the contents of a msi package to filesystem, you can use the following C# function:


public void ExtractMsiPackage() {    string parameters = string.Empty; parameters = string.Format(@"/a {0} /qb TARGETDIR=""{1}"" REINSTALLMODE=amus",

"C:\Temp\Test.msi", "C:\Temp\Extract"); Process process = Process.Start("msiexec", parameters); process.WaitForExit(); }

/a = Administrative mode

/qb = Minimal UI, UI will only display progressbar

TARGETDIR = Folder to extract the contents to

REINSTALLMODE = amus, will overwrite all existing files and registry settings

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.