I'm creating an installer and when it's running to install and user let some file open it goes to MsiRMFilesInUse Dialog, but at the end it's not closing the app, so I decided to create a custom action to allow us to have more control under it.
The problem is that I can't finish the installer in case that the user cancel to end the app proccess, I'll list below the proccess that I'm trying to do it.
First of all I detected if the proccess is running

Then I ask the user to allow us to close it or cancel

If OK button is pressed, I close the app

If CANCEL button is pressed, I try to abort the installer, but nothing happens at this point and installation continues normally

Thank you!