AnsweredAssumed Answered

Automation doesn't run anymore

Question asked by apankoke on Feb 23, 2015
Latest reply on Oct 9, 2015 by Kader.M

Hello,

My automation script doesn't work. I'am using Windows Server 2003 and scripting haot 5.6

Visual DSP++ 5.1.2

For some time it stops working.

On my Developer machine (Win7-64Bit) its still working. (WSH 5.8)

Error Message:

The remote procedure call failed.

CScript Error: Execution of the Windows Script Host failed. (0x80020102)


Any ideas out there?

 

Thanks

Andreas

 

This is my automation code:

var fileSystem = new ActiveXObject("Scripting.FileSystemObject");

var application = new ActiveXObject("VisualDSP.ADspApplication");

var projectList = application.ProjectList;

var outputWindow = application.OutputWindow;

var configuration;

 

 

application.Interactive = false;

 

WScript.Echo("Building projects of: " + fileSystem.getFolder(".") + "\\" + WScript.Arguments(0));

projectList.Open(fileSystem.getFolder(".") + "\\" + WScript.Arguments(0));

 

WScript.Echo("Main project is:"+ projectList(0).Name + "\n");

 

projectList.ActiveProject = projectList(0);   

 

for(count=projectList.Count; count>0; count--)

{

    var releaseNoJava = false;

   

    projectList.ActiveProject = projectList(count-1);   

       

    for(config=0, configCount=projectList.ActiveProject.Configurations.Count; config<configCount; config++)

    {

        if(projectList.ActiveProject.Configurations(config).search(/ReleaseNoJava/)>-1)

        {

            releaseNoJava = true;

            break;

        }

    }

   

    if(false == releaseNoJava)

    {

        projectList.ActiveProject.ActiveConfiguration = "Release";

    }

    else

    {

        projectList.ActiveProject.ActiveConfiguration = "ReleaseNoJava";

    }

   

    WScript.Echo(projectList.ActiveProject.Name + " - " + projectList.ActiveProject.ActiveConfiguration);

    try

    {

        projectList.ActiveProject.UpdateDependencies(true);   

        WScript.Echo("\nResults: \n" + outputWindow.GetText(1));

        if(count == 1) // main Project

        {

            WScript.Echo("\nNow build main project: " + projectList.ActiveProject.Name + "\n");

            projectList.ActiveProject.Build(true);

        }

        else

        {

            projectList.ActiveProject.BuildAll(true);

        }

        WScript.Echo("\nResults: \n" + outputWindow.GetText(1));

    }

    catch(e)

    {

        WScript.Echo("\nBuild project:'" + projectList.ActiveProject.Name + "' failed: \n");

        WScript.Echo("\nBuild results: \n" + outputWindow.GetText(1));

        WScript.Quit(1);

    }

}

 

// WScript.Echo("\nBuild results: \n" + outputWindow.GetText(1));

 

projectList.Close();

application.Quit();

Outcomes