We are booting into WINPE and launching a webpage to run the 'executetask' method to deploy an image to our computers. This webpage handles this call with the following vbscript code...
function ExecuteDeploymentTask(taskGuid, resourceguid, desc)
set taskManagement = CreateObject("Altiris.ASDK.Task.TaskManagement")
taskManagement.TargetServer = "XXX"
taskManagement.UserName = "XXX"
taskManagement.Password = "XXX"
taskManagement.DomainName = "XXX"
taskManagement.Authenticate()
inputXml = "<inputParameters><parameter><name>@AssignedResources</name><value>" & resourceGuid & "</value></parameter></inputParameters>"
ExecuteDeploymentTask = taskManagement.ExecuteTask(taskGuid, desc, inputXml)
set taskManagement = nothing
end function
Before we make this ASDK call I am checking to make sure the resource GUID exists in the vcomputer table, and it does. However, when you run the method above it fails as it doesnt know the resource guid. If I refresh the page the method call is able to work after a few minutes.
Obvisouly I need to check for the resource guid in a different table. Does anyone know where this would be?
Thanks for any help you can provide.