大网数据广告活动
安装更新与部署

Specifying Shortcuts

· 52CE 我爱测

The Shortcut table and related tables of the installation database hold information needed to install shortcuts. See the Program Information Tables Group and Editing Installer Shortcuts.

The Shortcut table and related tables of the installation database hold information needed to install shortcuts. See the Program Information Tables Group and Editing Installer Shortcuts.

In this section you add information that specifies advertised and non-advertised shortcuts for the Notepad sample.

Use your database editor to open MNP2000.msi and enter the following data into the Shortcut table.

Shortcut Table

Shortcut Directory_ Name Component_ Target Arguments Description Hotkey Icon_ IconIndex ShowCmd WkDir
sBaseball MENUDIR Baseball.txt Baseball Baseball orca_icon.exe
sConcert MENUDIR Concert.txt Concert [#Concert.txt]
sDance MENUDIR Dance.txt Dance [#Dance.txt]
sFootball MENUDIR Football.txt Football [#Football.txt]
sHelp MENUDIR Help.txt Help [#Help.txt]
sJanuary MENUDIR January.txt January [#January.txt]
sNewYears MENUDIR NewYears.txt NewYears [#NewYears.txt]
sNotepad MENUDIR Redpark.exe Notepad [#Redpark.exe]
sReadme MENUDIR Readme.txt Notepad [#Readme.txt]

The sample installation needs to enable installation of an advertised shortcut for the Baseball feature. This requires specifying a key to the Icon table in the Icon_ column of the Shortcut table. For the purposes of this example you may copy the icon for the Orca database editor provided with the Windows Installer SDK. Export the Icon table from Orca.msi and then merge this table into the MNP2000.msi database using Orca or another merge tool. Orca also creates a directory named Icon in the directory containing MNP2000.msi, and adds the icon binary data file orca_icon.exe.ibd. See the Data column in Icon table. The completed Icon table should look as follows when viewed in Orca.

Icon Table

Name Data
orca_icon.exe [Binary Data]

Continue

Related topics

Editing Installer Shortcuts

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。