导航

Windows installer basics

Posted on 2013-11-22 23:20  littledot  阅读(237)  评论(0编辑  收藏  举报

主要分两块:

1) Windows Installer Service  --- msiexec.exe,内建于Windows,C/S based

2) MSI database -- *.msi. ISV提供,指明安装的Sequence和Actions

 

事务式安装 -- All or nothing,如果有Custom Action, ISV需自己提供回滚

 

The installer service records everything that happens in sequential logic. The end result is a transactional record of the actions that are run during the installation. The beauty of this is as its transactional its quite simple to apply the reverse logic to handle the uninstall.

 

Windows Installer提供了详尽的log

1)命令行: msiexec.exe /i <path to msi> /l*vx <path to logfile>

2)其他,可参考:http://www.christiano.ch/wordpress/windows-installer-msi-kb/msi-understanding-the-windows-installer-logs/

可以用DebugView实时看log:

1)Create the Debug (reg_dword) registry entry under
HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer and set the data value to 00000002.

2)Start DebugView, now Windows installer installations will write their Standard/Custom Actions and this will be displayed in DebugView.

 

Log分析:

WiLogutl.exe 参考:http://msdn.microsoft.com/en-us/library/aa372811%28VS.85%29.aspx

 

Windows Install Team官方博客:

http://blogs.msdn.com/b/windows_installer_team/

 

http://blogs.technet.com/b/richard_macdonald/archive/2007/04/02/how-to-interpret-windows-installer-logs.aspx

 

 Windows Installer Sequencing

http://installpac.wordpress.com/2008/04/09/windows-installer-sequencing/

 

Recommend to read:

http://blogs.technet.com/b/alexshev/

 

http://www.advancedinstaller.com/user-guide/standard-actions.html

 

There is no "Uninstall Sequence". InstallExecuteSequence
(http://msdn.microsoft.com/en-us/library/aa369500.aspx) &
InstallUISequence
(http://msdn.microsoft.com/en-us/library/aa369543.aspx) run during
Install & Uninstall (and Modify/Repair/etc) unless actions within them
are conditioned appropriately.

 

MSI tips:

http://www.robertdickau.com/msi_tips.html