Deployment Solution

 View Only
  • 1.  Question about Run Scripts of Altiris Deployment Solution 6.9

    Posted Aug 28, 2011 10:07 PM

    Can Run Scripts job of Altiris Deployment Solution use the external dynamic variables? 

    For example, I want to run the command(hostname $var) on the target Linux server to change the hostname. Can the Altiris Deploy solution receive the varible $var from a external input?



  • 2.  RE: Question about Run Scripts of Altiris Deployment Solution 6.9

    Posted Aug 29, 2011 12:34 PM

    the script is downloaded locally to the machine then executed. I should work using bash or ther scripting.

     



  • 3.  RE: Question about Run Scripts of Altiris Deployment Solution 6.9

    Posted Aug 29, 2011 10:21 PM

    Thank you for your reply.The Run Scripts Job only support inputing a fixed parameter for the script,  What can i do if the script need a variable as input? 



  • 4.  RE: Question about Run Scripts of Altiris Deployment Solution 6.9

    Posted Aug 30, 2011 06:03 AM

    Hi,

    A while ago I found a post up here about running a job and passing parameters to it. Maybe this is what you're after? You can give it a try and see if this works for you...

    Create a job i.e. TestJob (Parm1 Parm2) and add the following script to the beginning of it. That will use whatever you specify as Parm1 and Parm2 in the brackets. Of course, you can also reduce or extend the amount of parameters you want to pass to the script.

    REM [Win32] Run a script with parameters supplied in the job name

    set A=%JOBNAME%
    set B=%A:*(=%
    set PARMS=%B:)=%
    FOR /f "tokens=1,2" %%A in ('echo %PARMS%') do (
    set PARM1=%%A
    set PARM2=%%B
    )


    REM "Here we only display the content, but you could also run your commands"

    echo Parameter 1 is: %PARM1%
    echo Parameter 2 is: %PARM2%

    Regards, BBC