Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Conditional Jobs based on OS (transition from 6.9 to 7.1)

Created: 17 Aug 2012 | 2 comments

I have been tasked with porting jobs from the Altiris 6.9 Deployment Console to the 7.1 Management Console, and I'm running into issues in regards to conditions in client jobs. (I confess I'm really new to this product. I'm just a student worker for my university's IT department.) I've attached screenshots of the new and old consoles.

In the Deployment Console, we have a lot of jobs that execute differently depending on which operating system was installed. It was fairly straightforward to implement them because conditions used fields related to the computers themselves.

But in the Management Console, it appears that while conditions have been made more flexible by using the output of previous tasks, using properties of the computers themselves seems to no longer be an option; none of the fields from 6.9 appear in the list.

At this point, I'm guessing that either there's a task to query the database for a field (which I can't find), or I need to create a task that returns the Operating System (and I don't know how to return a value from a command script to the Altiris Client). Could someone point me in the right direction?


Comments 2 CommentsJump to latest comment

JimChud's picture

Basically they have changed is so that the task is build conditionally instead of having a condition it applys to and then has a full set of different jobs this is all displayed in once section.

So the first step is to write youre query to gather the information you need as a validator then create the condtional job.

I use something like this:  for application installs on windows boxes based on processor. At the end i exit the script returning the variable out of the task for use in the condition.

On Error Resume Next
Option Explicit
Dim strComputer, objWMIService, colSettings, objProcessor
Dim StrCompProcType

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
& strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
("SELECT * FROM Win32_Processor")

For Each objProcessor In colSettings
    If objProcessor.Architecture = 9 Then
    '64 bit OS
 StrCompProcType = "x64"
    ElseIf objProcessor.Architecture = 0 Then
    '32 bit OS
 StrCompProcType = "x86"
    End If


you should be able to use the OS Name token to allow you to get the OSNAME and return it to the condition.

The job would be:
Run TASKNAME 'QUERYPROCESSOR' (or whatever you've called the task).
If 'QUERYPROCESSOR' Returns value equal x64
---> Run x64 Install Task
Else If 'QUERYPROCESSOR' Returns value equal x32
---> Run x32 Install Task
---> Run other job or x32 task

Obviously you would just use the OS as the if elses.

Regards Jim.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem and give a thumbs up to useful comments, articles and downloads.

SaschaH's picture

Well I dont think a VBScript will help as from the picture it looks like OSX is in the game. But you can use a Token and a Task Server Task. There is a Token "Operating System name" or short %OS%. Tokens query the database for inventory data from the client. You run it on the task server cause it can access the computer ID for the computer in question and you can use one script type.

In the Task Server Task you can check against that Token and then do the conditions as above mentioned.

A list of the Tokens in DS 7.1.

Bechtle – your strong IT partner. Today and tomorrow

If that seems to help, please "Mark as Solution"