Video Screencast Help

Cannot Run Windows Updates via VBScript

Created: 20 Jun 2013 | 7 comments

Hey guys.  I was fortunate enough to find this VBScript created by ianatkin, but I cannot for the life of me get this script to work within Altiris.  I've tried it as a software resource with custom success codes, and running as a VBScript task, and neither work.

The closest I get is when I utilize the 'Run Script' task, but it returns this error:

System.Exception: The parameter name "82d18154-89ef-463d-96c4-5ea399469701_@ReturnValue" is not in our input list and this condition cannot be evaluated at Altiris.TaskManagement.Common.Jobs.BaseConditionEntry.Evaluate(ParameterValueCollection inputParameterValues) at Altiris.TaskManagement.Common.Jobs.PreviousReturnConditionConfig.EvaluateCondition(ParameterValueCollection inputParameterValues) at Altiris.ClientTask.Server.Jobs.ClientPreviousReturnTaskHandler.OnExecute(String clientAgentHandlerXml, ParameterValueCollection inputParameters) at Altiris.ClientTask.Server.Jobs.BaseServerExecClientTaskHandler.OnExecute(AltirisResourceGuid assignedResource, ParameterValueCollection inputParameters)
 

Has anyone been able to utilize this script, and if so, how?

Thank you!

Operating Systems:

Comments 7 CommentsJump to latest comment

CFarrell's picture

Does it work when manually run on a test machine? Are there any clues in event viewer?

drdrew16's picture

Hello CFarrell,

Sorry for taking so long to reply; we're still migrating to 7.1 at my locale so that's been eating up most of my time.

The script itself runs beautifully when run manually, and it works great as a "Run Script" command in DS 6.9.  As far as any entires in the Event Viewer, I haven't seen any entires in either Altiris's Events & Alerts pane nor on the PC itself.  It appear as if the script runs correctly, but Altiris cannot recognize/parse the exit code/return value.  I'm using the return values 0 for complete, and 99 for "more updates & reboot", as passing it as a 1 fails the job altogether.

Is there any other information I can provide that would be more helpful?  I've attached a copy of the job itself if this helps.

job_excerpt.JPG
CFarrell's picture

One factor in 7.1 is that once a reboot happens, the job is done – it won’t come back to it after the reboot. So you will never get into the nested script runs.

drdrew16's picture

CFarrell,

Thanks for the information, I was not aware of that.  Though, to be clear, do you mean if I have the reboot task in a job it the agent will not come back to the job after the reboot, or if the script itself causes the reboot?

If it's the former, Is there a method by which I can achieve that functionality?

CFarrell's picture

Either way, if a rebbot happens then that is the end of the Altiris Job. I don't know of a way to do multiple reboots through Altiris, so hopefully someone else has an idea.

no-idea's picture

Seems you created conditions checking the wrong task.

Each task inside this job has is own GUID and the condition has to check the right one.

Somehow you mixed tasks and conditions, e.g first task to third condition.

drdrew16's picture

Interesting, I wouldn't have thought of that.  It's kinda difficult to match those, since they all look the same in the drop down.  smiley

I'll redo the tasks and see if that resolves it.