rodit
rodit

Reputation: 1766

COSMOS - Operating System Development - Error Setup Did Not Start?

As a result of starting to use c# more often, I decided to start using the COSMOS development kit. A link to the project can be found here.

However, I have read a tutorial of how to use COSMOS with vs 2013. Everything was going well until the installer gave me the following error: An image showing the error

Nothing like COSMOS and other self-setup dev kits EVER work for me even though I follow the exact instructions set out by the developers!

Does anyone know how to fix this error?

EDIT: I am on Windows 7 SP1, I use Visual Studio 2013 (if vs 2013 wasn't clear enough) and I have all the required prerequisites functioning correctly (if 'I follow the exact instructions set by the developer' wasn't clear enough). I have a 64-bit version of both Windows and Visual Studio, as surprising as this may seem, running on a 64-bit machine. Please do not down vote this question because of lack of information - The picture and this paragraph is all the information and data I have about my environment and development with COSMOS.

Upvotes: 2

Views: 1041

Answers (1)

Bobson
Bobson

Reputation: 13706

If you look at the source code for COSMOS here, this is the code that's currently running:

// 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);

The key line (and comments) are:

// 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);

For some reason, that program didn't start within the 10 seconds allocated to it, so it bombed out. Given the comment associated, I suspect that the "hack" failed on your machine.

schtasks.exe is the Task Scheduler. The /run and /tn flags tell it to immediately run the task named as Quoted("CosmosSetup"). I don't know what that value is, but my guess is that schtasks.exe is failing for you because you aren't an administrator.

Check the event log on your system for any related errors.

Upvotes: 4

Related Questions