如果您在此处查看 COSMOS 的源代码,这是当前正在运行的代码:
// This is a hack to avoid the UAC dialog on every run which can be very disturbing if you run
// the dev kit a lot.
Start(@"schtasks.exe", @"/run /tn " + Quoted("CosmosSetup"), true, false);
// Must check for start before stop, else on slow machines we exit quickly because Exit is found before
// it starts.
// Some slow user PCs take around 5 seconds to start up the task...
int xSeconds = 10;
var xTimed = DateTime.Now;
Echo("Waiting " + xSeconds + " seconds for Setup to start.");
if (WaitForStart("CosmosUserKit-" + mReleaseNo, xSeconds * 1000))
{
throw new Exception("Setup did not start.");
}
Echo("Setup is running. " + DateTime.Now.Subtract(xTimed).ToString(@"ss\.fff"));
// Scheduler starts it an exits, but we need to wait for the setup itself to exit before proceding
Echo("Waiting for Setup to complete.");
WaitForExit("CosmosUserKit-" + mReleaseNo);
关键线(和评论)是:
// This is a hack to avoid the UAC dialog on every run which can be very disturbing if you run
// the dev kit a lot.
Start(@"schtasks.exe", @"/run /tn " + Quoted("CosmosSetup"), true, false);
由于某种原因,该程序没有在分配给它的 10 秒内启动,所以它被炸毁了。鉴于相关评论,我怀疑您的机器上的“黑客”失败了。
schtasks.exe
是任务计划程序。和标志告诉它立即运行名为 的/run
任务。我不知道那个值是什么,但我猜这对你来说是失败的,因为你不是管理员。/tn
Quoted("CosmosSetup")
schtasks.exe
检查系统上的事件日志是否有任何相关错误。