惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
WordPress大学
WordPress大学
小众软件
小众软件
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
腾讯CDC
量子位
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Google Online Security Blog
Google Online Security Blog
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
罗磊的独立博客
L
LINUX DO - 最新话题
博客园 - Franky
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
AI
AI
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
I
Intezer
S
Securelist

博客园 - Joey Liang

[译稿]微软过去30年做对了5件事_Microsoft 微软_cnBeta.COM Galin Iliev [Galcho] Blog! - Rule "Previous releases of Microsoft Visual Studio 2008" failed - Joey Liang The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) - Powered By Kayako SupportSuite - Joey Liang 随笔 文章 新闻 日记 有啥区别~ - 博问 - 博客园社区 Save (Not Permitted) Dialog Box yongwnet - 博客园 笔记:编程的一些建议 - 时间伙伴 - 博客园 编译原理学习导论 - ★★★TINYUE的专栏★★★ - CSDNBlog 编译原理学习指导 - ★★★TINYUE的专栏★★★ - CSDNBlog System.Data.SqlServerCE load problem - MSDN Forums Connect WM5 emulator to the network A nice gift from SQL Server 2005 SP2 to sync developers(转自http://blogs.msdn.com/synchronizer/default.aspx) - 江南白衣 - 博客园 微软一年从中国挣走8亿美金 - 老杳 - 网易博客 UIP Forums (Logged in as: v-yilian) 一份比较详细的DOS命令说明! (上)_小不 FIX: Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy" HTC Home with 5/6 tabs on ELF [Archive] - xda-developers How to sync all tasks information from desktop to device in Windows Mobile 5 Test Embedded : CE 6.0 - why the codename "Yamazaki" ?
MSI Silent Mode Installations for InstallScript MSI Projects
Joey Liang · 2008-01-21 · via 博客园 - Joey Liang

MSI Silent Mode Installations for InstallScript MSI Projects

InstallShield DevStudio

If you need to silently install an InstallScript MSI project without using Setup.exe, you can use the MSI silent mode.

Launching MSI Silent Installations for InstallScript MSI Setups

The MSI silent installation is launched in the following cases:

  • The installation is launched at the command line by typing msiexec product.msi /qn.
  • The installation is activated from an advertised shortcut.
  • The installation is activated from install-on-demand.
  • When the product is removed when an update package is running.

Unlike the traditional silent mode, the MSI silent mode does not follow the regular logic provided through script. It simply runs through the InstallExecuteSequence table. (To see this table, navigate to the Direct Editor.) As a result, some events are not fired, including the following:

  • All UI installation events—OnFirstUIBefore and OnFirstUIAfter
  • All Feature events

The OnMsiSilentInstall Event

What the Event Does

In an InstallScript MSI project installation, InstallShield DevStudio runs the OnMsiSilentInstall event handler if the product is not already installed on the target system. This happens if the installation is launched by msiexec product.msi /qn or if the installation is activated from an advertised shortcut.

You need to override the OnMsiSilentInstall event if you want to support the MSI silent installation mode. This allows you to perform tasks that are normally performed in the OnFirstUIBefore, OnFirstUIAfter, and feature event handlers.

Overriding the Event

By default, OnMsiSilentInstall displays a message and then aborts the installation. You can override this event handler by writing your own implementation of the function. The prototype of this function is as follows:

external prototype OnMsiSilentInstall(HWND hInstall);

where hInstall is the handle to the installation.

The simplest thing you can do is to implement an empty body of this event so installation will not abort, as:

function OnMsiSilentInstall(hInstall)
begin
	//Do nothing and allow installation to continue.
end;

Again, OnMsiSilentInstall will be fired on MSI silent installation and on activation of an advertised shortcut. It will not be fired on Install-On-Demand, auto-repair, and uninstall mode.

Using MsiExec.exe Directly

If you want to use MsiExec.exe directly, you need to first use MsiExec.exe to install ISScript.msi (unless you are certain that the latest script engine files are available on the target system). You can do this by typing MsiExec.exe /qn /i ISScript.msi at the command line.

Detecting the Mode in which a Silent Install is Running

To detect whether a traditional silent install is running from InstallShield script, use

if (MODE = SILENTMODE)

To detect whether an MSI silent mode installation (including /q, advertise, auto-repair, uninstall, or install-on-demand) is running from InstallShield script, check the MSI property "ISSETUP_UISEQUENCE_PROCESSED" using the MsiGetProperty Windows Installer API function. If this property is not set, then it is a silent install. (It indicates that the InstallUISequence is not executed.)

See Also

Silent Installations

MSI Silent Mode Installations for InstallScript MSI Projects