Setup & Deployment: Close an instance of a process before installing.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Logan1337
    New Member
    • May 2007
    • 38

    Setup & Deployment: Close an instance of a process before installing.

    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.
  • Logan1337
    New Member
    • May 2007
    • 38

    #2
    Originally posted by Logan1337
    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.
    Solved--but none too easily:

    Comment

    Working...