如何将程序添加到VS2022安装程序项目中的用户程序菜单?

发布于 2025-02-12 12:41:44 字数 62 浏览 2 评论 0原文

如何使用Visual Studio 2022设置项目将程序添加到目标用户的程序菜单中?无论如何,这都是很棒的。

How do I add a program to my target user's program menu using Visual Studio 2022 setup project? Any way to do it would be great.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罗罗贝儿 2025-02-19 12:41:44

假设您需要与安装程序软件包一部分的程序进行快捷键(最有可能在“应用程序文件夹”中),则可以使用以下步骤:

  1. 打开安装程序项目的“文件系统”视图(右) - 单击“解决方案资源管理器”中的项目,然后从“弹出菜单”中选择“视图 - > file System”命令)。

  2. 在该视图的左侧窗格中选择“用户的程序菜单”,然后右键单击右侧窗格的任何地方;然后,您应该查看带有“创建新快捷方式”命令的弹出菜单(类似于如下所示)

“在此处输入图像说明”

  1. 选择此命令;然后,在随后的对话框中,导航到捷径(可执行文件),然后单击“确定”。然后,该项目的快捷方式将出现在文件系统视图的右侧窗格中,您可以与Windows中的任何其他文件一起重命名。

要为快捷方式添加图标,请在右侧窗格中选择该新项目,然后在“属性”窗口中选择“ browse”属性。您可以在目标文件系统中浏览图标 - 但请注意,默认情况下,仅显示“*.ICO”文件;如果要查找目标程序并使用该文件的默认值(即最低ID号)图标,则需要在弹出对话框中选择“所有文件”或“可执行文件”。

Assuming you want a shortcut to a program that is part of the installer package (most likely in the "Application Folder"), then you can use the following steps:

  1. Open the "File System" view for your installer project (right-click on the project in Solution Explorer and select the "View -> File System" command from the pop-up menu).

  2. Select the "User's Programs Menu" in the left-hand pane of that view, then right-click anywhere in the right-hand pane; you should then see a pop-up menu with a "Create New Shortcut" command (similar to that shown below)

enter image description here

  1. Select this command; then, in the dialog box that follows, navigate to the target (executable) for the shortcut and click "OK". A shortcut to that item will then appear in the right-hand pane of your File System View, which you can rename as with any other file in Windows.

To add an icon for the shortcut, select that new item in the right-hand pane and then, in the "Properties" window, select "Browse" from the "Icon" property. You can browse for an icon in the target file system – but note that, by default, only "*.ico" files are shown; you need to select "All Files" or "Executable Files" in the pop-up dialog if you want to find the target program and use that file's default (i.e. lowest ID number) icon.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文