Reputation: 191
what i have:
<... After="InstallFinalize">NOT Installed</Custom>
for installation<... Before="InstallInitialize">Installed</Custom>
for uninstallationwhat's the problem:
so what i want:
what's the solution:
yeah, hope for it standing below my text soon:) maybe the title is not very good, thats because I don't have an idea how to go further...
Upvotes: 1
Views: 685
Reputation: 191
ServiceControl elements: Cool thing, but I had a similar problem: if the previous (manually) installed services is still running while running the msi-package a popup asks what to do (stop service, cancel, ..).
I ended up with separating the concern of uninstalling the previous version from the new installation-routine. i simple wrote a batch-skript which runs before the msi-package will run.
Upvotes: 0
Reputation: 55581
The easiest way to back you out of the corner you find yourself in is to write an installer that uses the ServiceInstall and ServiceControl elements (Remove attribute with Both value) to define the service. Target the files to a new directory that wasn't used before so that your reference counts aren't all messed up. Use the RemoveFile element to delete the old installation of the files for good measure. The goal is to be able to upgrade removing the fold files and uninstall with everything gone.
If the old files weren't consistently deployed to the same directory you'll either have to come up with a list of known directories and write duplicate RemoveFile statements or write a custom action that searches for the files and deletes them. (Suboptimal)
Upvotes: 1