简体   繁体   English

Wix-如何创建在安装过程中使用的临时文件

[英]Wix - How to create a temporary file to use during an installation

In InstallShield there was an easy way to use support files that were only needed for the installation. 在InstallShield中,有一种简单的方法可以使用仅安装所需的支持文件。 These were all saved in the ISSetupFiles table, which is a custom table by InstallShield. 这些都保存在ISSetupFiles表中,该表是InstallShield定制的表。 I'm trying to do a simliar thing in Wix. 我正在尝试在Wix中做类似的事情。 I'm new to Wix and I haven't yet figured out how create files in the TempFolder for use during my installation and then how to delete them once the installation is complete. 我是Wix的新手,还没有弄清楚如何在TempFolder中创建文件以在安装期间使用,以及如何在安装完成后删除它们。

I use C# DTF custom actions and that has a very good story for extracting resources to the current directory of the custom action for the life of the custom action. 我使用C#DTF自定义操作,在自定义操作的生命周期中,有一个很好的故事,可将资源提取到自定义操作的当前目录。 It's not that difficult to define a custom table similar to ISSetupFiles (but hopefully support directories and not just all the files in one directory ) and then extract them with a custom action, set a property (SUPPORTDIR) to their location and then clean up at the end of the installation. 定义类似于ISSetupFiles的自定义表并不难(但希望支持目录,而不仅仅是一个目录中的所有文件),然后通过自定义操作提取它们,将属性(SUPPORTDIR)设置到其位置,然后在安装结束。

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

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