InstallShield卸载快捷方式的创建
2008-07-22 21:33
204 查看
方法如下:
prototype CreateUninstallShortcut(); //放在#include "ifx.h"后
//将该函数的代码加到安装脚本setup.rul中
function CreateUninstallShortcut()
string strCmdLine;
LIST lstPath;
begin
// For an InstallScript installation:
strCmdLine = DISK1TARGET ^ "Setup.exe";
// For an InstallScript MSI installation:
strCmdLine = UNINSTALL_STRING;
// The path has to be handled differently if you are running
// an InstallScript MSI installation on Windows 9X.
if ( SYSINFO.WIN9X.bWin9X ) then
lstPath = ListCreate( STRINGLIST );
StrGetTokens( lstPath, UNINSTALL_STRING, "/" );
ListGetFirstString( lstPath, strCmdLine );
LongPathToQuote( strCmdLine, TRUE );
strCmdLine = strCmdLine + " /M" + PRODUCT_GUID;
endif;
AddFolderIcon(FOLDER_PROGRAMS ^ szProjectName, "卸载",strCmdLine, "",TARGETDIR^"Uninstall.ico",0, "", REPLACE );
end;
最后只需在OnFirstUIBefore函数return之前调用下这个函数就可以了,但有实际使用中有两个方面需要注意:
1:szProjectName根据实际情况填写:如果你的程序安装后为“开始||程序||Simple||卸载”则需该为FOLDER_PROGRAMS ^ "Simple", 如果为“开始||程序||Simple||Simple||卸载”则改为FOLDER_PROGRAMS ^ "Simple//Simple"。
2:TARGETDIR^"Uninstall.ico"根据实际情况填写:即ICO文件所在的目录^ICO文件的名称。
prototype CreateUninstallShortcut(); //放在#include "ifx.h"后
//将该函数的代码加到安装脚本setup.rul中
function CreateUninstallShortcut()
string strCmdLine;
LIST lstPath;
begin
// For an InstallScript installation:
strCmdLine = DISK1TARGET ^ "Setup.exe";
// For an InstallScript MSI installation:
strCmdLine = UNINSTALL_STRING;
// The path has to be handled differently if you are running
// an InstallScript MSI installation on Windows 9X.
if ( SYSINFO.WIN9X.bWin9X ) then
lstPath = ListCreate( STRINGLIST );
StrGetTokens( lstPath, UNINSTALL_STRING, "/" );
ListGetFirstString( lstPath, strCmdLine );
LongPathToQuote( strCmdLine, TRUE );
strCmdLine = strCmdLine + " /M" + PRODUCT_GUID;
endif;
AddFolderIcon(FOLDER_PROGRAMS ^ szProjectName, "卸载",strCmdLine, "",TARGETDIR^"Uninstall.ico",0, "", REPLACE );
end;
最后只需在OnFirstUIBefore函数return之前调用下这个函数就可以了,但有实际使用中有两个方面需要注意:
1:szProjectName根据实际情况填写:如果你的程序安装后为“开始||程序||Simple||卸载”则需该为FOLDER_PROGRAMS ^ "Simple", 如果为“开始||程序||Simple||Simple||卸载”则改为FOLDER_PROGRAMS ^ "Simple//Simple"。
2:TARGETDIR^"Uninstall.ico"根据实际情况填写:即ICO文件所在的目录^ICO文件的名称。
相关文章推荐
- InstallShield 6.2 创建卸载快捷方式
- InstallShield卸载快捷方式的创建
- InstallShield 6.2 创建卸载快捷方式
- InstallShield X (10.5) 使用手记之《创建卸载应用的快捷方式》
- InstallShield 6.2 创建卸载快捷方式
- InstallShield 创建卸载快捷方式
- InstallShield 6.2 创建卸载快捷方式
- VS2008 c# 创建快捷方式 卸载程序
- HOWTO:InstallShield中如何制作应用程序的卸载快捷方式
- .Net程序打包安装与卸载制作 ——怎样创建网页快捷方式(“开始与程序”菜单中)?(七)
- Android 为应用创建多个桌面快捷方式,可在卸载时自动删除桌面快捷方式
- 用InstallShield制作卸载快捷方式
- InstallShield Developer 8 使用手记之《创建卸载应用的快捷方式》
- InstallShield错误:由于添加自动卸载的快捷方式使得无法正确安装和卸载的问题
- InstallShield工程中如何使得动态文件链接方式也可以创建快捷方式
- InstallShield中添加一个卸载快捷方式或设置反卸载 - DISK1TARGET
- HOWTO:InstallShield工程中如何使得动态文件链接方式也可以创建快捷方式
- VS2010安装部署打包说明(快捷方式创建和卸载设置)
- InstallShield 12 Premier卸载程序快捷方式
- HOWTO:InstallShield中如何制作应用程序的卸载快捷方式