简体   繁体   English

包括vb.net安装文件

[英]including files with vb.net installation

when i am building the installation file i need to be including some jpegs and i need them to be saved to a specific location 当我建立安装文件时,我需要包含一些jpeg,我需要将它们保存到特定位置

  1. how do i include jpegs in the installation? 如何在安装中包含jpeg?
  2. how do i have them be extracted to specific directories? 我如何将它们提取到特定目录?

You should do that via Setup Project that should be added to your existing project. 您应该通过应添加到现有项目中的安装项目来执行此操作。

After you created it, open context menu on "File system on target machine", select "Add special folder" -> "Custom folder" 创建完成后,打开“目标计算机上的文件系统”上的上下文菜单,选择“添加特殊文件夹”->“自定义文件夹”

Next step is to add your jpeg files. 下一步是添加jpeg文件。 Right click on your new folder and select "Add file". 右键单击新文件夹,然后选择“添加文件”。 Select all your jpegs. 选择所有的jpeg。

Now, you need to select the location where that folder with jpegs will be You need to open properties for that new folder and select appropriate directory for DefaultLocation property. 现在,您需要选择带有jpegs的文件夹所在的位置。您需要打开该新文件夹的属性,并为DefaultLocation属性选择适当的目录。

Keep in mind, that its good practice to store your files within the installed application. 请记住,将文件存储在已安装的应用程序中是一种很好的做法。 That's why the DefaultLocaiton does not allow you to just enter any custom path you want. 这就是为什么DefaultLocaiton不允许您仅输入所需的任何自定义路径的原因。 You will have only limited list of folders, but that should be enough. 您将只有有限的文件夹列表,但这应该足够了。

After you compile the project it will create you an installation file that will contain all your stuff 编译项目后,它将创建一个包含所有内容的安装文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM