[英]How do I embed a banner image and or add remove programs icon in my setup project?
I'm using a setup project in visual studio 2010 to create an installer for a program I'm working on. 我正在Visual Studio 2010中使用安装项目来为我正在处理的程序创建安装程序。 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.
但是,我的程序不是很大,只能作为EXE和一些DLL安装。 So it seems a little silly to me that the 4th and 5th files that get "installed" are graphics only used during installation.
因此,对我来说,“安装”的第4个和第5个文件只是在安装过程中使用的图形,这似乎有点愚蠢。
Is there some way I can embed these images in the installer or one of my other projects? 有什么方法可以将这些映像嵌入安装程序或其他项目之一?
I'm currently using VS 2008 and just been playing around with the setup project. 我目前正在使用VS 2008,并且一直在使用安装项目。 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. 当将exclude设置为true时,您将看到标题文件已从应用程序文件夹中删除-但仍将显示在项目树中-该文件的图标将带有一个红色小圆圈,并带有一条直线。
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. 希望这可以帮助。
In the setup project properties you can put an image for the add/remove icon in the property AddRemoveProgramsIcon
在安装项目属性中,您可以在属性
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. 对于标题图像,请右键单击安装项目,依次单击“视图”->“用户界面”,单击所需的页面,然后在所需的属性中单击
BannerBitmap
属性。
该博客讨论了一种无需修改Visual Studio项目即可更改标题图像的方法。
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". 如果要更改应用程序EXE的图标,则只需右键单击EXE并单击“创建快捷方式”。 In the properties you will find the icon and you can change it.
在属性中,您将找到该图标,然后可以对其进行更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.