Hi,
the idea behind is to have a dynamic filter which is excluded in every policy affecting clients. These policies are agent install / upgrade polices, managed software deliveries and patch management policies. Of course you can exclude from any other, too (like inventory policies etc). But for failure-free installation it is important to have no other installations beside the ones in the install process.
To include a client into this filter we need an asdk script at the beginning of the process and at the end of the process the client have to be cleaned out of the filter.
What to do now:
Create a filter and name it like you want (e.g. “install filter”).
Create a “add to filter” script task for taskserver (be careful it’s another than normal) and paste following input (vbscript type). The script should run at the early beginning of the install process. You can let it run just before the os installation (so all membership updates on the smp can run). You need the guid of the filter (properties of filter) in the script. Just fill in the necessary const. I provided the source code for working with the filter name, too. But my experiences is that in some cirumstances working with the name could error out (often when the filter name is very long and complex).
Option Explicit
'Const strFilterName = "My Filter" 'only needed when you want to address the filter by name
Const itemfilterforadding = "guid of filter"
Dim oCollectionManagement
Dim oItemManagement
Dim strItemName
Dim colItems
Dim itemComputer
Dim itemComputerToAdd
Dim itemFilter
Dim itemFilterForAdding
Set oCollectionManagement = CreateObject("Altiris.ASDK.NS.CollectionManagement")
Set oItemManagement = CreateObject("Altiris.ASDK.NS.ItemManagement")
oItemManagement.CreateLocalInstance()
oCollectionManagement.CreateLocalInstance()
ItemManagement.TargetServer = "%NSSERVER%"
itemManagement.Authenticate()
strItemName = "%COMPNAME%"
colItems = oItemManagement.GetItemsByName(strItemName)
For Each itemComputer In colItems
itemComputerToAdd = itemComputer.Guid
Next
'this part is only needed when you want to address the filter by name
'strItemName = strFilterName
'colItems = oItemManagement.GetItemsByName(strItemName)
'For Each itemFilter In colItems
'itemFilterForAdding = itemFilter.Guid
'Next
Call oCollectionManagement.AddInclusions(itemFilterForAdding, itemComputerToAdd)
Call oCollectionManagement.UpdateCollections(itemFilterForAdding)
And at the end of the install process create another script for task server for clearing the filter out (vbscript type). The input is nearly the same with the difference of the called function in the last but one line.
Option Explicit
'Const strFilterName = "My Filter" 'only needed when you want to address the filter by namea
Const itemfilterforadding = "guid of filter"
Dim oCollectionManagement
Dim oItemManagement
Dim strItemName
Dim colItems
Dim itemComputer
Dim itemComputerToAdd
Dim itemFilter
Dim itemFilterForAdding
Set oCollectionManagement = CreateObject("Altiris.ASDK.NS.CollectionManagement")
Set oItemManagement = CreateObject("Altiris.ASDK.NS.ItemManagement")
oItemManagement.CreateLocalInstance()
oCollectionManagement.CreateLocalInstance()
ItemManagement.TargetServer = "%NSSERVER%"
itemManagement.Authenticate()
strItemName = "%COMPNAME%"
colItems = oItemManagement.GetItemsByName(strItemName)
For Each itemComputer In colItems
itemComputerToAdd = itemComputer.Guid
Next
'this part is only needed when you want to address the filter by name
'strItemName = strFilterName
'colItems = oItemManagement.GetItemsByName(strItemName)
'For Each itemFilter In colItems
'itemFilterForAdding = itemFilter.Guid
'Next
Call oCollectionManagement.RemoveInclusions(itemFilterForAdding, itemComputerToAdd)
Call oCollectionManagement.UpdateCollections(itemFilterForAdding)
What is now happening in the install process: the client becomes a member of the filter at the beginning and at the end he gets out of this filter. Now you can work with the filter and set it as an exclusion in any policy you have. So the client becomes “isolated” in the install process.
One thing to ask: Do you work with task servers? If yes, there is a thing to mention. On the task server you need the asdk components. You can find them in the file repository of your Symantec installation manager. If you have a lot of task servers you can create a new software resource and deploy it with the help of a task / policy.
This is the whole process. The most workload is to exclude the filter in all your existing policies (depends on how many policies you have).
As I mentioned in post above, you have to keep in mind that the client is included in the filter at the beginning of the installation. If the installation is breaking off you have to remove the client manually from the filter. If you don’t do, some things won’t work for the client (even reinstalling).
If there are any questions, just ask.
Regards