Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

NS ASDK VBscript in DS Job not executing

Created: 05 Jan 2013 | 4 comments
dawi_x's picture

Hi all,

environment: DS 6.9 SP5 MR2 and NS 7.1 SP2 installed on the same Win2008R2 server.

I am trying to use a vbscript in deployment server 6.9 which leverages the NS ASDK to add a newly deployed computer to an NS filter.

The code used is well known on connect and it is working if I execute it manually on the server.

If I use this script (embedded or referencing a vbs file) in a DS job (using 'run local on deployment server') it will stay in the running state forever. When adding some logging to the script the first lines are executed with no issue and the script hangs on the first line which uses the ASDK. More specifically on initializing Collection management ==> Set oCollectionManagement = CreateObject("Altiris.ASDK.NS.CollectionManagement"). The Altiris service is running with a 'priviliged' domain user account.

Has anyone seen this behaviour? I have read some post which states it might have to do with some COM assemblies not correctly registered.

I am seeing this in two different environments having the same setup (latest DS and NS versions on same 2008R2 machine)

 

Tnx for the response

kr, dawi_x

Comments 4 CommentsJump to latest comment

Stefan S.'s picture

Hi,

You are using a priviliged' domain user account. Is the account part of the Symantec Administrators group? As far as I know if it is not it will not work.

Stefan

dawi_x's picture

Hi Stefan,

Yes, it is in the Symantec Administrators group.

I have seen this behaviour now in 4 different environments all with the same infrastructure setup (Win2008R2 with DS and NS on the same machine).

I would like to have someone confirm to have it working or not in the same infrastructure setup.

 

kr, dawi_x

Stefan S.'s picture

Hi,

I do not have this setup so I cannot confirm if it works or not. However, I have some Run Script jobs in the DS 6.9 which call the ASDK and they work fine. But actually I use the webservices instead.

 

Here a little snippet:

Dim objHTTP
Set objHTTP = CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET", "http://nsserver/altiris/asdk.ns/ItemManagementService.asmx/DeleteItem", False
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.send "itemGuid=" &  machineGuid
Set objHTTP = nothing

This for sure works also with the "Collection" webservices.

Altiris/asdk.ns/collectionManagementService.asmx?op=AddInclusions

Stefan

 

 

dawi_x's picture

Hi Stefan,

The scripts I use are also working fine on previous/older DS installation environments, so the script itself is not the problem. Its really the specific environment.

I also already tried to use powershell and webservices, but the same problem arises (and not when I run manually on server).

It really is some problem in creating/initializing the objects.

Anyways, for now, I have a workaround in place, which actually creates a dynamic scheduled task on the server itself (based on token replacement), running the script from this scheduled task and then again deleting the created task.

Tnx for the response and effort!

kr, dawi_x