Symantec Management Platform (Notification Server)

 View Only
  • 1.  invoking Altiris ASDK script from C++

    Posted Jun 27, 2012 10:38 AM

    Hi,

    I have kind of a tricky problem which is not related directly to SMP (kindly excuse me for that)

    I have created a vb script using ASDk 2.0 which is running fine, (double clicking or running from command prompt)

    My requirement is to call the script from with in c++. For that i used CreateProcess or ShellExecuteEx function. When i do so i get error

    "Active X Component cannot create object Altiris.ASDK.NS.SoftwareDelivery.SWDSolnPackageManagement" ...

    Could this be related to user rights ... or registering the dll ...  i would really appreciate some feedback.

    Thanks,

    UmiBau



  • 2.  RE: invoking Altiris ASDK script from C++

    Posted Jun 27, 2012 02:34 PM

    are using C++ anyway, why not just use the #import directive, and instead of calling the script, implement the functionality directly in C++ ?

     

    Cheers

    Phil



  • 3.  RE: invoking Altiris ASDK script from C++

    Posted Jun 27, 2012 04:36 PM

    Hi Phil, thanks for your reply.

    Actually i want that script can be modified externally independant of the c++ code. So whatever script is written to do Altiris deployment or other tasks, it should run without requiring to run and  build c++code every time.

    Regards,

    Fatima



  • 4.  RE: invoking Altiris ASDK script from C++

    Posted Jun 28, 2012 02:52 AM

    as they say in Germany, the Eier-Liegende Voll-Milch-Sau :P

    As you don't say how complex the script is, and what exactly you are trying to do (but I'll have a wild guess from the Object you are trying to create), we import Software Packages into the Repository, and build the deployment, repair and deinstall jobs using XML, for each package. Each package has an XML, which contains install, repair and de-install strings / commands, as well as any pre-requisites and "post" requisites that it needs.

    The code is written in C#, whilst not as low-level as C++, it is alot easier when "fannying-around" with COM objects.

     

    Cheers

    Phil

     



  • 5.  RE: invoking Altiris ASDK script from C++
    Best Answer

    Posted Jun 28, 2012 04:25 AM

    Hi,

    I figured out the problem, it was that Altiris ASDK dlls are actually COM assemblies, and inorder for them to run through visual studio it was required to get them registered with .NET framework using regasm.

    Just registering them made them work absolutely fine :)

    Hope it will help some one else

    Regards,
    UmiBau