WiX - trying to figure out install sequences

前端 未结 4 1849
我寻月下人不归
我寻月下人不归 2021-02-04 19:28

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 W

相关标签:
4条回答
  • 2021-02-04 20:09

    Well, I finally got it working - with a bit of help from everyone who responded, and by consulting some of the WiX tutorials and help pages out there on the web. MSI installer stuff isn't easy to figure out and learn......

    Basically, I changed execution of my custom action to "deferred" (as suggested by Rob) and I moved the point in the sequence where it gets executed to "After=InstallFiles". I also changed the condition in the <Custom> tag to "NOT Installed" which seems to work just fine in my scenario.

    Contrary to Rob's fear, the Db Update Manager and its UI come up quite nicely this way, and the process of updating our database is now completed before any of our services (that depend on the database) get started.

    Looking forward to a full RTM release of WiX 3.0 (and its future) !

    Thanks to everyone - unfortunately, I could only accept one answer - all would have deserved it.

    Marc

    0 讨论(0)
  • 2021-02-04 20:10

    You can open the .msi in Orca and look at the InstallExecuteSequence table to see what order things are actually happening in. This may give you a good idea of what's actually happening when.

    0 讨论(0)
  • 2021-02-04 20:19

    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 讨论(0)
  • 2021-02-04 20:21

    It appears that your CustomAction depends on the 'DbUpdateManagerFile' being installed. That means that your CustomAction needs to be scheduled after InstallFiles executes. Remember there are two passes to the InstallExecuteSequence. First, the "immediate" (or "scheduled" or "script generation") actions are executed to build the transaction log (aka: "install script"). Second, the "deferred" actions in the transaction log are executed.

    Right now your CustomAction is "immediate" (the default) so it is trying to run before the files are actually copied to the machine. The InstallFiles action is in the script before your CustomAction but it hasn't been executed yet.

    So, you need to mark your CustomAction "deferred" to get it to run after your files are installed.

    Note: you are not probably not able to show UI from a deferred CA. I wasn't sure if this tool of yours was expected to show UI.

    PS: sorry if I didn't explain that well, it's been a long day.

    0 讨论(0)
提交回复
热议问题