开发者

Is there a way to handle catch exception in MSI install wizard?

I am facing some odd situation that when I select/deselect the features in the feature customization wizard, it sometimes crashes the window. It does not give any clue at all. It also not happens consistently.

Do you have any idea or faced such kind of issue? I am able to even trace the root cause u开发者_开发百科sing install log.


You may be able to get closer to isolating the problem if you turn on the Debug policy. Do this by setting HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer's Debug value to (dword) 7 in as described on the Windows Installer team blog. You will then need to use a tool like DebugView to view the extra output that Windows Installer will generate. Note you may have to restart the "msiserver" service for the policy to take effect. Best luck making sense of what it shows; often it's just a lot of SQL query dumps.


You can sometimes grab MSI exceptions from out of the event log, but they won't always tell you much.

Instead what you can do is turn on logging of the MSI, this can be done either via the registry, or via the command line. To find out about the registry option, visit this MS Support article. To do it from the command line you can use the same switches, but they obviously will only last for that one install. This is a snapshot as gathered from msiexec:

Logging Options
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>


    i - Status messages

    w - Nonfatal warnings

    e - All error messages

    a - Start up of actions


    r - Action-specific records

    u - User requests

    c - Initial UI parameters

    m - Out-of-memory or fatal exit information

    o - Out-of-disk-space messages

    p - Terminal properties

    v - Verbose output

    x - Extra debugging information

    + - Append to existing log file

    ! - Flush each line to the log

    * - Log all information, except for v and x options

    /log <LogFile>

            Equivalent of /l* <LogFile>

To take advantage of these options, use msiexec directly:

msiexec.exe [path to your msi] /l [your options]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜