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

  • SEARCH
  • Home
  • 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 7418141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:49:53+00:00 2026-05-29T07:49:53+00:00

I use WIX for installing an application & a service, If I install the

  • 0

I use WIX for installing an application & a service,

If I install the service for the first time, I want it to be “disabled” and that works fine by setting the field Start=”disabled” in the serviceInstall element.

If I install (upgrade) the service while it is already installed on the computer and is set to “Automatic”, I want the service to be “Automatic” after the upgrade too, and I can’t get this behaviour, The service is upgraded and set as “disabled”.

I tried to do this by using 2 serviceInstall element, in one of them Start=”disabled” and in the other Start=”Auto”.

I added a condition to each of my serviceInstall that asks if the service is installed already.

I guess my conditions are not good….

What is the best way for this?

Thanks a lot

  • 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-29T07:49:54+00:00Added an answer on May 29, 2026 at 7:49 am

    I recently encountered a similar problem as well, and the way I approached it is using custom actions after the install. It’ll look something like this:

    <CustomAction Id="SetStartUpType" BinaryKey="CA.SetStartUpType" DllEntry="CustomAction" Execute="immediate" Return ="check"/>
    <Binary Id="CA.SetStartUpType" SourceFile="../WixCustomAction/bin/$(var.BUILD)/WixCustomAction.CA.dll" />
    
    <InstallExecuteSequence>
      <Custom Action='SetStartUpType' After='InstallFinalize'>Installed</Custom>
    </InstallExecuteSequence>
    

    Setting the custom action condition to “Installed” makes sure that it only changes the startup type if it is already installed. So in your wix file you probably just need one serviceinstall element with start=”disabled” for the first install to be disabled.

    And thanks to Peter Kelly, there is a way to manually change the service startup types and start the services (if you wish) in your custom actions file. Details can be found here

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

Sidebar

Related Questions

In my WiX installer I want to gracefully close the application that is about
Can I use CustomActionAttribute in classes that inherit from System.Configuration.Install.Installer? I want my class
At work we use WiX for building installation packages. We want that installation of
use this website a lot but first time posting. My program creates a number
I have an application that is a not so simple Windows service (C#). I
I tried to use the code below in Wix. But when installing, the installer
We use Wix to build an installer for our .NET application and are just
How do you use WiX to create a second service pack for your app?
I'm attempting to use Wix to create a database during install. I have my
I have started to use WIX to deploy a WPF application. I have created

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.