msi installer not release

Any SharpSetup related discussions are welcome here including but not limited to questions about functionality, suggestions for improvements and technical questions.
Otmar
Posts: 10
Joined: Wed Jan 23, 2013 6:08 pm

msi installer not release

Postby Otmar » Wed Jun 01, 2016 3:20 pm

Hi,

I launch a couple of msi installers for uninstall, but after the uninstallation of the last one my main installer (Gui.exe) doesn't release the msi installer (still in use). The last msi is successfully uninstalled.
When I check with process explorer I see that my msi installer is still in used by Gui.exe.

I used the following code to uninstall the msi
MsiConnection.Instance.Open(fullmsiFileName, MsiUninstallProperties(component));
MsiConnection.Instance.Uninstall();
FullmsiFileName path the location of the msi. In MsiUninstallProperties I add some properties to uninstall certain msi.

Question
Do you know with which command I can release the msi. I need to release the msi, because it need to be replace with a new one.

Kind regards
Otmar

tomasz_grobelny
Posts: 463
Joined: Sat May 22, 2010 1:26 pm

Re: msi installer not release

Postby tomasz_grobelny » Sun Jun 05, 2016 9:16 pm

You can try using:

Code: Select all

MsiConnection.Instance.CloseAll();


Please also make sure that the msi file is not reopened by some other calls. For that you may want to stop execution of the code just after Uninstall()/CloseAll() call (either by using debugger or eg. showing a modal dialog box) and check if the msi file is used then.

Also, for uninstallation you may want to try to use just the product code, not the msi file.


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest