Making sense out on .MSI verbose trace - running a CustomAction

前端 未结 2 412
北海茫月
北海茫月 2021-01-26 10:55

Making sense out of an .MSI verbose trace. I created the .MSI using VisualStudio 2008.

Here\'s the background on what I\'m trying to do: http://xmlpreprocess.codeplex.c

相关标签:
2条回答
  • 2021-01-26 11:25

    Yes, the ErrorIcon is just noise and can be ignored. I'm in the process of removing this 'noise' from my MSI now so I can properly debug.

    The error is being caused by your custom action returning a Windows Error of 1722.

    Running 'net helpmsg 1722' at the cmd prompt yields;

     The RPC server is unavailable.
    

    So that command is doing something that either depends on the local RPC server service (not started, which is odd because it is critical to Windows I think) or a remote server is reporting that back.

    0 讨论(0)
  • 2021-01-26 11:26

    Like in your previous question where I suggested using cmd.exe /C XmlPreProcess.exe ... for redirection, for debugging you can try with /K instead of /C. Then any output should stick around, and you'd be able to work within the context of the MSI at the time of error.

    What I really suspect is the problem is the scheduling of your custom action. If this action is immediate, scheduled before InstallFinalize, and intended to operate on a file you will be installing, it will run before files are installed to the location you expect. The proper fix for this is generally to run the action in-script (also called deferred) so that by scheduling it between InstallFiles and InstallFinalize, it actually runs in that corresponding location.

    As for providing better errors for your end users, or allowing them to browse for a file, these would both take custom actions, and probably need to be DLL actions (EXE actions can provide only pass/fail feedback). It will be your choice whether it's better (or easier) to provide a browse dialog or to verify the path the user provides. I'm not certain how much of this you can do in a Visual Studio Installer project (which is what I'm assuming you're using by your tags).

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