Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete msi file before running process is closed #683

Closed
xplicit opened this issue Jul 30, 2019 · 1 comment
Closed

Can't delete msi file before running process is closed #683

xplicit opened this issue Jul 30, 2019 · 1 comment

Comments

@xplicit
Copy link
Contributor

xplicit commented Jul 30, 2019

If you run following code you can't delete setup.msi file. The error says that the file is used by the running process and does not allow to delete file. You can delete file only when process exits.

using (MsiParser msiParser = new MsiParser(@"setup.msi"))
{
     var code = msiParser.GetProductCode();
}

This is because some MSI interops handles are not closed properly, I've made a PR for fixing this issue

oleg-shilo added a commit that referenced this issue Jul 30, 2019
Fix #683. Close MSI Interop handles when getting data from MSI
@oleg-shilo
Copy link
Owner

Thank you for the fix.
I am reopening it so it is not closed until the fix is publicly available.

@oleg-shilo oleg-shilo reopened this Jul 30, 2019
oleg-shilo pushed a commit that referenced this issue Aug 11, 2019
* Added registry values aggregator (`RegKey`):
  ```
  new RegKey(fullSetup, RegistryHive.LocalMachine, @"Software\My Company\My Product",
      new RegValue("Message", "Hello"),
      new RegValue("Count", 777)),
  ```
* Issue #699: Wix Error for ServiceInstaller if at least one ServiceConfig parameter is not specified
* Improvements to DigitalSignature to allow loading cert by sha1hash
* Implemented custom message dialog instead (of the default MessageBox.Show) for displaying error message (if any detected) during the MSI session.
* Issue #688: Adding prompt to CloseApplication prevents installer from completing.
* Issue #683. Close MSI Interop handles when getting data from MSI
* Issue #672: outdir and BuildMsiCmd fails because the outdir is not created
* Issue #670: msi is always creating root folder, even if feature is disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants