Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Enable/Disable Patches Web Page

Updated: 11 Jun 2007 | 7 comments
Screenbert's picture
0 0 Votes
Login to vote

Ahhh! The sky is falling! The sky is falling! How many times has the helpdesk accused patches of "breaking" something and you need to be able to quickly view what collections you have applied the patch to and also quickly disable/enable the patch?

(Seems to have happened to me on a regular basis at the last two companies I worked at.) So here's a Web page that let's you select from all patches with a task and quickly do all those things without winding your way through the console.

If you haven't ever done any Web programming, don't be intimidated. If you've done batch or VB scripting, you can muddle your way through it.

You'll need the following to use it:

  • ASDK
  • Server with IIS
  • Basic programming knowledge. Preferably in C#.

If you haven't created any Web pages using the ASDK yet then follow the instructions found in the help file under "Creating and Using Proxy Classes" before you start using this Web page. That will set up the interface from the IIS server to the NS server. It will create some class files that you need to put in a APP_CODE folder where you house these files.

Also there may be one line in the code that you will change for your environment.

Verify that your Patch Management Folder Guid -- The one labeled Microsoft -- is the same as the one below. If not, modify the Altiris_PatchMgmt.aspx.cs file with your guid.

Guid guidPatchFolder = new Guid("{21c32410-ed2c-4bf4-80fb-b1a72a0e5aba}");

I tried adding a function to allow you to add and remove collections, but currently the ASDK does not support changing collections on Patch tasks. I'm hoping there will be a Patch Management ASDK piece released soon. I'll be posting more. If you have ideas be sure to post a comment on what you would like to see.

License: AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support: User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Comments

erikw's picture
13
Feb
2007
0 Votes 0
Login to vote

Enable/disable

Can you provide an example of the Web page?

It could be very helpfull to see the code.

Regards
Erik

Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)

*************************************************************
If your issue has been solved, Please mark it as solved
***********

Screenbert's picture
13
Feb
2007
0 Votes 0
Login to vote

Code and example

When I originally posted it I forgot to put a screenshot in there. I submitted one later that afternoon and it looks like it is there now. The zip file has all the code in it in the aspx.cs file. That should help!

Screenbert

Screenbert

erikw's picture
14
Feb
2007
0 Votes 0
Login to vote

Thnxssssss

Thnxssss for adding the code.

Regards
Erik

Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)

*************************************************************
If your issue has been solved, Please mark it as solved
***********

ianatkin's picture
07
Aug
2008
0 Votes 0
Login to vote

Collection Manipulation in Patch Management

Hi,

First, a big thanks for all your work on the ASDK. Without it, it would take me months to decipher my way through the kit. Thankyou.

I've been hitting my head against a wall on the Patch Management side, trying to remove the default collections on patch tasks.

I keep getting fails with the error "The Input String was not in the correct format" when trying to use the RemoveCollectionFromSoftwareUpdateTask method,

NSServer="testserver"
BulletinName="MS08-036"

'---------------------------------------
' Setup management objects
'---------------------------------------
set SoftwareBulletins = CreateObject("Altiris.ASDK.PatchManagement.SoftwareBulletins")
SoftwareBulletins.TargetServer = NSServer
SoftwareBulletins.Authenticate()

set SoftwareUpdateTasks = CreateObject("Altiris.ASDK.PatchManagement.SoftwareUpdateTasks")
SoftwareUpdateTasks.TargetServer = NSServer
SoftwareUpdateTasks.Authenticate()

set itemManagement = CreateObject("Altiris.ASDK.NS.ItemManagement")
itemManagement.TargetServer = NSServer
itemManagement.Authenticate()


'-------------------------------------------------------------
' Get the list of Guids that match the collection and bulletin name
'-------------------------------------------------------------
CollName="All Windows Computers with Software Update Agent Installed"
Collectionguid = itemManagement.GetItemsByNameAndType( CollName, "collection" )
SoftwareBulletinPolicy = itemManagement.GetItemsByNameAndType(BulletinName,"Altiris.PatchManagementCore.Policies.SoftwareBulletinPolicy")

msgbox SoftwareBulletinPolicy(0) & "," & Collectionguid(0)

result = SoftwareUpdateTasks.RemoveCollectionFromSoftwareUpdateTask(SoftwareBulletinPolicy(0),Collectionguid(0))

I've tried dozen's of variants, but can't seem to get this working.

At the time you wrote this article, these functions weren't available. Now they are, do you have any idea of what i'm doing wrong??!

Kind Regards,
Ian./

Ian Atkin, Senior Developer for the ICT Support Team, Oxford University, UK

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

neil_rogers's picture
07
Aug
2008
0 Votes 0
Login to vote

Set default collection

Seems like it would be easier to just set the default task collection for patch under the configuration. Is that what you are looking to do?

Neil

ianatkin's picture
07
Aug
2008
0 Votes 0
Login to vote

Yes, but...

... my end-goal here is to is automate staging of patches to the pilot groups, and then on to the wider environment.

If I can't manipulate the collections in the software bulletin tasks, i'm pretty stuffed...

Kind Regards,
Ian./

Ian Atkin, Senior Developer for the ICT Support Team, Oxford University, UK

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

Steen Bogø's picture
18
Feb
2009
1 Vote +1
Login to vote

PM on tree NS

HI

How do you use your code on tree NS's, from a single website.
I have tree NS servers that i would like to control from a single web site. How do you access each NS with your code?

Kind Regards
Steen