installshield动态创建快捷方式
2008-01-15 11:05
381 查看
帮助文档里的函数 /*-----------------------------------------------------------*/
*
* InstallShield Example Script
*
* Demonstrates the AddFolderIcon function.
*
* This example places a shortcut to an executable file on the
* Start menu and the Start Programs menu.
*
* Note: Before running this script, set the preprocessor
* constants so that they reference the fully qualified
* names of the Windows Notepad executable and a valid
* text file on the target system.
*
/*-----------------------------------------------------------*/
#define PROGRAM "C://Windows//Notepad.exe"
#define PARAM "C://Windows//Readme.txt"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_AddFolderIcon(HWND);
function ExFn_AddFolderIcon(hMSI)
STRING szProgramFolder, szItemName, szCommandLine, szWorkingDir;
STRING szShortCutKey, szProgram, szParam, szIconPath;
NUMBER nIcon;
begin
// Set up parameters for call to AddFolderIcon.
szProgramFolder = FOLDER_STARTMENU;
szItemName = "Notepad Example 1";
szProgram = PROGRAM;
szParam = PARAM;
LongPathToQuote (szProgram, TRUE);
LongPathToShortPath (szParam);
szCommandLine = szProgram + " " + szParam;
szWorkingDir = "";
szIconPath = "";
nIcon = 0;
szShortCutKey = "";
// Add a shortcut to the Start menu.
if (AddFolderIcon (szProgramFolder, szItemName, szCommandLine,szWorkingDir,
szIconPath, nIcon, szShortCutKey, REPLACE) < 0)then
MessageBox ("AddFolderIcon failed.", SEVERE);
else
SprintfBox (INFORMATION, "AddFolderIcon", "%s createdsuccessfully.",
szItemName);
endif;
szProgramFolder = "";
szItemName = "Notepad Example 2";
// Add a shortcut to the Programs menu.
if (AddFolderIcon (szProgramFolder, szItemName, szCommandLine,szWorkingDir,
szIconPath, nIcon, szShortCutKey, REPLACE) < 0)then
MessageBox ("AddFolderIcon failed.", SEVERE);
else
SprintfBox (INFORMATION, "AddFolderIcon", "%s createdsuccessfully.",
szItemName);
endif;
end;Powered by ScribeFire.
相关文章推荐
- HOWTO:InstallShield工程中如何使得动态文件链接方式也可以创建快捷方式
- InstallShield卸载快捷方式的创建
- installshield 2009 无法创建快捷方式
- InstallShield 6.2 创建卸载快捷方式
- InstallShield 6.2 创建卸载快捷方式
- InstallShield 6.2 创建卸载快捷方式
- InstallShield 创建卸载快捷方式
- InstallShield卸载快捷方式的创建
- InstallShield 6.2 创建卸载快捷方式
- InstallShield工程中如何使得动态文件链接方式也可以创建快捷方式
- C#入门学习-----菜单应用(添加剂快捷方式、设置菜单项是否可用、修改菜单字体、创建级联菜单、级联菜单的动态合并)
- InstallShield X (10.5) 使用手记之《创建卸载应用的快捷方式》
- “目录2”挂载“目录1”的方法:也就是“目录2”下创建一个“目录1”的快捷方式的方法
- Android创建桌面快捷方式两种方法
- 为Ubuntu Gnome环境创建桌面快捷方式
- unity 实现另一个unity软件的安装工具(5)——创建桌面快捷方式
- 创建程序菜单和快捷方式的代码
- VS2010安装部署打包说明(快捷方式创建和卸载设置)
- android应用创建快捷方式
- 为WEB程序创建桌面快捷方式^_^