【发布时间】:2018-07-27 21:30:51
【问题描述】:
有没有办法计算捆绑安装程序的执行时间?我有三个 MSI,它们链接在一个捆绑包安装程序中。我想获取用于登录文本文件(日志文件)的所有 MSI 安装程序的总执行时间。
谢谢。
【问题讨论】:
标签: wix windows-installer bundle bootstrapper execution-time
有没有办法计算捆绑安装程序的执行时间?我有三个 MSI,它们链接在一个捆绑包安装程序中。我想获取用于登录文本文件(日志文件)的所有 MSI 安装程序的总执行时间。
谢谢。
【问题讨论】:
标签: wix windows-installer bundle bootstrapper execution-time
自定义引导程序应用程序?:奇怪的是,它还没有包含在引导程序中。您使用的是WiX Standard Bootstrapper Application 还是Custom Bootstrapper Application?我从来没有时间创建适当的自定义引导程序应用程序,但我想如果您使用 .NET 应用程序,您可以使用简单的 StopWatch 吗?听起来太简单了,但也许值得一试。
更新:将压缩模型替换为一个小的临时应用程序示例。
using System;
using System.Diagnostics;
using System.Threading;
namespace StopWatchTester
{
class Program
{
public static void Main(string[] args)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
Thread.Sleep(4000); // stuff happens here
stopwatch.Stop();
Console.WriteLine("Time elapsed: {0}", stopwatch.Elapsed);
Console.ReadLine(); // keep console open
}
}
}
Silent Burn Bundle Install?:我想你可以从你自己的可执行文件中以安静模式启动整个 setup.exe Burn 包并使用上面的代码来计时执行? Running Burn-driven installer in quiet mode (command line parameters).
【讨论】: