Installshield 2009 (Installshield2008)创建windows常规安装文件的卸载快捷方式
2009/08/06 03:39 A.M.
创建windows基本安装文件的卸载快捷方式-Installshield2009 -Creating Uninstallation Shortcuts for Basic MSI Projects 使用InstallShield 2009为了给新软件创建一个卸载快捷方式,本来一个小事情,却在网上找了半天的说明资料也没能试成功,原因是那些说明大多都是基于Installshield早期版本的(也可能是偶的方法不对-_-~~),后来在Installshield自带的帮助文件中搜索,发现其实创建卸载快捷方式很简单。说简单点就是先创建一个快捷方式,然后分别将Arguments、Target 分别设为:/x [ProductCode]、 [SystemFolder]msiexec.exe,下面是Installshield 2009自带的英文帮助文件说明,本人作了简单的中文翻译,估计Installshield2008,2010也适用,为突出重点有删减,参见下图: Project This information applies to Basic MSI projects. (注:本说明适用于windows基本安装工程项目,基于脚本的请搜索另一篇) According to current Microsoft Certified for Windows Vista guidelines, best practice is to not place shortcuts to remove the application in the Start menu. An uninstallation shortcut is unnecessary because your application’s uninstaller is in Add or Remove Programs. Task To create an uninstallation shortcut: (创建卸载快捷方式:) 1. Open the Shortcuts view. (1.打开快捷方式视图项,位于安装设计模式下左边第四个列表项第一子项,见上图) 2.In the Shortcuts explorer, right-click the destination directory that should contain the uninstallation shortcut, and then click New Shortcut to Preexisting file. InstallShield adds a new shortcut with the default name NewShortcutN (where N is a successive number). (2.在快捷方式浏览页(右页),在想要创建卸载快捷方式的目录上单击右键,并选择“New Shortcut to Preexisting file”(创建已存在文件的快捷方式),Installshield会添加一个新的默认文件名为NewShortcutN的快捷方式(N是一个连续的数字)) 3.Enter a new name, or right-click it later and click Rename to give it a new name. (3.重命名,如“卸载XXXSetup”) 4. In the Arguments field, type /x [ProductCode]. Separate the two arguments with a space. (4. 在Arguments字段属性键入“/x [ProductCode]”,注意不要改变引号内的字符串,x后有一空格,此为关键部分1) Msiexec.exe is the command-line engine for the Windows Installer service. The /x argument instructs the Windows Installer service to uninstall the product referenced by the product code. (说明: Msiexec.exe是windows安装服务的命令行执行引擎,参数“/x”指明windows安装服务会依照产品号来卸载的产品) 5. Set the Advertised field to No. (5.将Advertised字段设为NO) 6. In the Target field, select [SystemFolder], and then append msiexec.exe to this location. (6. 将Target字段设为:[SystemFolder]msiexec.exe ,关键2) 7. In the Component field, select the component with which you want this shortcut associated. If the shortcut should always be installed, associate it with the component containing your application’s main executable file. (7.Component字段,用于设置卸载快捷方式关联的组件,如果任何情况下都要求安装,则设为应用程序主可执行文件即可)。 |