Hello, I need to close all instances of a process before beginning my installation (overtop an old version), otherwise the user will get an error saying that the file is in use and installation cannot proceed.
I'm surprised this isn't a common thing to want to do. What I want is very simple:
Get an instance to all running processes of a given name,
Close those processes,
Begin installation.
I tried doing this via the Configuration.I nstall.Installe r class's BeforeInstall event, but then realized that this was housed in the assembly that I am trying to quit! So of course it won't be able to run it if it hasn't been installed yet.
Is there some sort of script I can run that will do this? Windows Installer is so bizarre to me I can't understand its logic.
I'm surprised this isn't a common thing to want to do. What I want is very simple:
Get an instance to all running processes of a given name,
Close those processes,
Begin installation.
I tried doing this via the Configuration.I nstall.Installe r class's BeforeInstall event, but then realized that this was housed in the assembly that I am trying to quit! So of course it won't be able to run it if it hasn't been installed yet.
Is there some sort of script I can run that will do this? Windows Installer is so bizarre to me I can't understand its logic.
Comment