Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 603055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:53:22+00:00 2026-05-13T16:53:22+00:00

Problem I have an MSI that creates and starts a Windows service during installation

  • 0

Problem

I have an MSI that creates and starts a Windows service during installation and stops and removes the service during uninstallation. This works fine when installing and uninstalling by itself, but when upgrading, the Files in Use dialog is displayed (only on Vista and later due to the new Restart Manager), indicating that the service is in use.

Background

The Files in Use dialog is displayed during the InstallExecute sequence by the InstallValidate custom action, which is scheduled immediately before the RemoveExistingProducts custom action; this means that the previous version has not been uninstalled yet, so the Files in Use dialog should be shown.

The MSDN documentation indicates that the RemoveExistingProducts action must be scheduled after the InstallValidate action, and I currently have the RemoveExistingProducts actions scheduled immediately after the InstallValidate action.

Potential Solution

I would like to reschedule the RemoveExistingProducts custom action to immediately before the InstallValidate custom action so that the previous installation has a chance to stop and remove the service before the Files in Use dialog is shown. I tried rescheduling the actions, and it appears to work correctly with no adverse side-effects (although the log still indicates that the InstallValidate action executes before the RemoveExistingProducts action), but I’m hesitant to use this solution since it violates the MSDN documentation, and there may be adverse effects that I’m just not seeing yet.

Has anyone tried this? The only other alternative I can think of is to have the new installation stop the service of the old installation, but this is undesirable because it requires the installation to have information about all old installations that it can upgrade (stopping this particular service may involve more than just a simple call to the Service Manager to stop it).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:53:23+00:00Added an answer on May 13, 2026 at 4:53 pm

    I implemented the potential solution outlined in the question, scheduling RemoveExistingProducts immediately before InstallValidate. I haven’t seen any problems yet, but I will post again after the installation gets more use.

    Update

    Our installation has been using this for some time, and I haven’t noticed any ill effects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings! I have developed a Windows Service that seems to install just fine most
I have a question. The problem is that I have another process which invoked
I have a fairly simple desktop application that uses a .NET setup project (.msi
I have a program that I am working on the Uninstall for. It involves
I have 3 files - Alky for Applications.msi ( which make Vista Apps work
I have some C# 4.0 code that attempts to install a CA (.der encoded)
I'm using FSharp.Compiler.CodeDom (from the PowerPack ) to dynamically create F# classes. The problem
I've created a Wix (3.0) custom action written in .NET. Fine. The problem is
I have a .NET application which uses an accdb file (MS Access 2007 format)
In visual studio 2010 I have setup a Project Visual Studio Installer it includes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.