Deployment Solution

 View Only
  • 1.  Is there a way to add arguments to tasks or jobs

    Posted Jun 17, 2009 09:01 PM
    Hi,

     I've found many ways in which Altiris DS handles variables very well, such as scripting out SQL queries inside tokens. But is there a way to add Ad-hoc arguments to your scripts?

     I'm aware of the additional cmd-line swtiches you can add to a script task, but when adding them you change the nature of the job. Meaning if you want an ad-hoc task to be run you have to wait for that task to complete, then remember to go back and change that task back. Otherwise the next time you run that task, the ad-hoc argument will be applied. 

     I thought maybe I should use computer containers, then I could query the computer's accounts location and match it up with a variable. But that could get really messy if I get two scripts that require ad-hoc user inputs.

    Any thoughts appreciated,
    jasbro


  • 2.  RE: Is there a way to add arguments to tasks or jobs

    Posted Jun 18, 2009 10:48 AM
    You can of course use built in tokens, or custom tokens to query information from the database and accomplish what you're looking for, but there's also a trick I figured out that also might be useful.  The trick is causing a script to branch according to what folder the job is placed in.  That way if you want to change the nature of the "parameter" to the job, you just move it to another folder.  I wrote an article back in march that demonstrates how to do this.

    https://www-secure.symantec.com/connect/downloads/using-conditional-branch-according-parent-folder-script

    Hope that helps



  • 3.  RE: Is there a way to add arguments to tasks or jobs

    Posted Jun 19, 2009 12:26 PM
    I'm definately not going to disregard branching as a technique to control script flow, but what I have in mind may be a bit more variable than what I can account for in a branched subset of code.

    I have a job that creates partitions on a disk using diskpart. My team constantly gets requests to modify the patition sizes away from our standard build. I've already written the script to handle variable paritions but would like Altiris to run it so I can hand it off to other engineers.

    Any other suggestions on how to accomodate such a dynamic variable?

    thanks,
    jasbro