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 185803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:32:07+00:00 2026-05-11T15:32:07+00:00

I’m installing a large app, and part of it is a custom written tool

  • 0

I’m installing a large app, and part of it is a custom written tool called ‘DbUpdateManager’ to mass execute SQL scripts against our target database.

Right now, the WiX 2.x install works – but it has one flaw: during install, I also install a couple of Windows services, which can be optionally started right away. Those however will fail, if the DbUpdateManager hasn’t been run yet.

So what I’m trying to accomplish is this:

  1. Install DbUpdateManager and my services from my MSI
  2. Run DbUpdateManager BEFORE any of the services start up

My current WiX source looks something like this:

<Directory Id='INSTALLDIR' Name='DbUpdMgr' LongName='DbUpdateManager' >   <!-- DbUpdateManager component with the necessary files -->   <Component Id='DbUpdateManagerComponent' Guid='...' DiskId='1'>      <File Id='DbUpdateManagerFile' LongName='DbUpdateManager.Wizard.exe'             Name='DbUmWz.exe' src='DbUpdateManager.Wizard.exe'  KeyPath='no' />   </Component>    <!-- Component to install one of my Windows services -->   <Component Id='InstallServiceComponent' Guid='...' DiskId='1'>      <File Id='InstallServiceFile' LongName='MyService.exe'             Name='MyServic.exe' src='MyService.exe' KeyPath='yes'/>      <ServiceInstall Id='InstallMyService' Name='MyService'                       Description='My Service' ErrorControl='normal'                       Start='auto' Type='ownProcess' Vital='yes' />      <ServiceControl Id='UninstallMyService' Name='MyService'                       Remove='uninstall' Wait='yes' />   </Component>    <!-- Feature for the DbUpdateManager referencing the above component -->       <Feature Id='DbUpdateManager' ConfigurableDirectory='INSTALLDIR'             AllowAdvertise='no' Description='DbUpdateManager' Level='1'             Title='Database Update Manager'>      <ComponentRef Id='DbUpdateManagerComponent'/>   </Feature>    <!-- Custom action for running DbUpdateManager -->       <CustomAction Id='RunDbUpdateManagerAction' FileKey='DbUpdateManagerFile'                  ExeCommand='' Return='asyncWait' />    <!-- Calling the custom action in the install sequence -->       <InstallExecuteSequence>       <RemoveExistingProducts After='InstallInitialize' />       <Custom Action='RunDbUpdateManagerAction'                After='InstallFinalize'>&amp;DbUpdateManager=3</Custom> 

I inherited this WIX, and it works – but as I said – the DbUpdateManager gets called too late in the process (only ‘After=InstallFinalize’) and thus the services will fail to start up properly at first (the run fine the second time around when you restart them manually after DbUpdateManager has run).

I poked around the MSI documentation a bit and found a nice step called ‘StartServices’, so my hunch was to just change my calling the custom action to this:

   <InstallExecuteSequence>           <Custom Action='RunDbUpdateManagerAction'                    Before='StartServices'>&amp;DbUpdateManager=3</Custom> 

Unfortunately, in this case, nothing at all happens – DbUpdateManager NEVER gets called….

Any ideas why? Debugging the MSI/WiX stuff is really really tricky, and I can’t seem to see the forest for the trees anymore….

Thanks! Marc

EDIT: The ‘RunDbUpdateManagerAction’ is placed in the right position in the InstallExecuteSequence table in my MSI – right AFTER InstallServices and just BEFORE StartServices – and yet it doesn’t work…. DbUpdateManager (a Winforms utility) does not show up during installation 🙁

EDIT 2: now my action appears to be executed and at the right time – unfortunately, I’m just not seeing my wizard 🙁 What I’m seeing is an error code ‘return value 1631’ which means something like ‘MSI Service could not be started’ – wtf ???

MSI (s) (2C:D8) [20:53:36:383]: Doing action: RunDbUpdateManagerAction Action 20:53:36: RunDbUpdateManagerAction. Action started at 20:53:36: RunDbUpdateManagerAction. MSI (s) (2C:D8) [20:53:36:383]: Doing action: StartServices Action 20:53:36: StartServices. Services are being started Action started at 20:53:36: StartServices. Action finished at 20:53:36: RunDbUpdateManagerAction. Return value 1631.

  • 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. 2026-05-11T15:32:08+00:00Added an answer on May 11, 2026 at 3:32 pm

    Try getting a log file of the Installation, and look for the sequence order in there and the value of the condition to perform the Custom Action

    Use this in the command line: msiexec /i [msiname] /l*v [filename]

    EDIT: After reading your comment have a look at this page here you could try to add NOT INSTALLED in the condition

    EDIT2: I found this page Search for your error Number 1631

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.