HOWTO:如果检测用户是从系统的“添加/删除”中卸载软件
2010-09-16 15:24 Kevin.Wan 阅读(3303) 评论(2) 收藏 举报版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。
在事件响应函数OnMaintUIBefore中添加如下代码:
if (!ADDREMOVE) then
// Setup is not being run from Add/Remove Programs
else
// Setup is being run from Add/Remove Programs
MessageBox("Setup run from Add/Remove Programs is forbiden",INFORMATION);
abort;
endif;
// Setup is not being run from Add/Remove Programs
else
// Setup is being run from Add/Remove Programs
MessageBox("Setup run from Add/Remove Programs is forbiden",INFORMATION);
abort;
endif;
注意:上述方法适用于InstallScript和InstallScript MSI工程。
万炳宏(Kevin Wan)
Avizo/Amira技术交流,欢迎加我微信:13911850365或QQ:17842153
浙公网安备 33010602011771号