如何在我的安装项目中嵌入横幅图像和/或添加删除程序图标?
我正在使用 Visual Studio 2010 中的安装项目为我正在开发的程序创建安装程序。我希望在我的设置中拥有自定义横幅图像,并在添加删除程序中拥有自定义图标。
我已将这两个图像添加到安装程序的“应用程序文件夹”中,并且能够使它们正确显示。但是,我的程序不是很大,仅作为 EXE 和一些 DLL 安装。因此,“安装”的第四个和第五个文件是仅在安装过程中使用的图形,这对我来说似乎有点愚蠢。
有什么方法可以将这些图像嵌入到安装程序或我的其他项目之一中吗?
I'm using a setup project in visual studio 2010 to create an installer for a program I'm working on. I want to have a custom banner image in my setup as well as a custom icon in add remove programs.
I've added both these images to the "Application Folder" of my installer and was able to get them to show up correctly. However, my program is not very big and only installs as an EXE and a few DLLs. So it seems a little silly to me that the 4th and 5th files that get "installed" are graphics only used during installation.
Is there some way I can embed these images in the installer or one of my other projects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我目前正在使用 VS 2008,并且刚刚尝试过安装项目。我相信以下内容有效 - 在我的测试中确实有效。
您将看到它已添加到“应用程序”文件夹中。
当您将排除设置为 true 时,您将看到横幅文件从应用程序文件夹中删除 - 但它仍然会显示在项目树中 - 该文件的图标将有一个红色的小圆圈,中间有一条线。
我已经使用横幅和自定义图标完成了此操作,并测试了我的安装 - 两者都运行良好,并且两个文件都没有显示在应用程序文件夹中。
希望这有帮助。
I'm currently using VS 2008 and just been playing around with the setup project. I believe the following works - it did in my tests.
You will see that it's been added to the Application folder.
When you set exclude to true you will see the banner file removed from application folder - but it will still be shown in the project tree - the icon will for the file will have a little red circle with a line through it.
I've done this with both the banner and a custom icon and tested my install - worked fine with both and neither file showed up in the application folder.
Hope this helps.
在安装项目属性中,您可以在属性
AddRemoveProgramsIcon
中放置添加/删除图标的图像对于横幅图像,右键单击安装项目,查看 ->用户界面,单击所需的页面,然后在属性中选择所需的
BannerBitmap
属性。In the setup project properties you can put an image for the add/remove icon in the property
AddRemoveProgramsIcon
For the banner image, right click on the setup project, View -> User Interface, click on the page you want, and then in the properties you want the
BannerBitmap
property.这个博客讨论了一种改变的方法横幅图像,无需修改 Visual Studio 项目。
This blog discusses a way to change the banner image without modifying the Visual Studio project.
如果您想更改应用程序EXE的图标,那么您只需右键单击EXE并“创建快捷方式”即可。在属性中,您将找到该图标并且可以更改它。
If you want to change of the icon of the application EXE, then you just need to right click on the EXE and "create shortcut". In the properties you will find the icon and you can change it.