Unblock Windows XP updates with this member-submitted admin script
Takeaway: In 2005, TechRepublic asked members to submit their favorite Network Administration scripts and this is one of the responses. You can use this script to automate the cleanup of old BITS jobs that may have stuck in the queue during a previous Windows update.
In 2005, TechRepublic asked members to submit their favorite Network Administration scripts for possible publication. One of the first to make a submission was Tina Shields.
Tina Shields' script in her own words
I am a network admin, and have been using SUS and then WSUS to keep my 50+ servers up to date on Windows patches for the past few years. The desktop group used Service Pack Manager for workstations, but it required too much management. So, I assumed responsibility of updating 600+ workstations. I ran into some issues with XP machines not having correct security identifiers for the Automatic Updates and Background Intelligent Transfer Services (BITS), and old BITS jobs from the previous version stuck in the queue. I wrote this script to "clean up AU." It works like a charm.
Table A
'================================================================
' SCRIPT NAME: cleanau.vbs
' AUTHOR: TDShields,
' DATE: 8/18/2005
' COMMENT: To remove old BITS jobs
'================================================================
Option Explicit
on error resume next
dim oAU, oBITS, oComputer
dim oCommand, oFSO, oShell
do while lcase(oComputer) <> "quit"
' gather input
oComputer = InputBox("Enter the workstation's name, or type quit to exit")
' stop services
set oFSO = CreateObject("Scripting.FileSystemObject")
set oBITS = GetObject("WinNT://" & oComputer & "/BITS")
oBITS.stop
set oAU = GetObject("WinNT://" & oComputer & "/wuauserv")
oAU.stop
' delete old jobs
set oFSO = CreateObject("Scripting,Filesystemobject")
oFso.DeleteFile("\\" & oComputer & "\c$\Documents and Settings\All Users\application data\microsoft\network\downloader\*.*" & chr(34)), DeleteReadOnly
' set security descriptors on services
Set oShell = CreateObject("WScript.shell")
oCommand = "sc \\" & oComputer & " sdset bits " & chr(34) &"D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)
(A;;CCLCSWLOCRRC;;;AU)
(A;;CCLCSWRPWPDTLOCRRC;;;PU)" & chr(34)
oShell.RunoCommand
oCommand = "sc \\" & oComputer & " sdsetwuauserv " & chr(34) & "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)
(A;;CCLCSWLOCRRC;;;AU)
(A;;CCLCSWRPWPDTLOCRRC;;;PU)" & chr(34)
oShell.RunoCommand
' start services
oBITS.start
oAU.start
loop
Print/View all Posts Comments on this article
SponsoredWhite Papers, Webcasts, and Downloads
- IBM Multiform Master Data Management: The evolution of MDM applications IBM
- Sprint IPVoice Connect Fact Sheet Sprint
- Nextel Direct Connect Fact Sheet Sprint
- Demo: Need Disk Space? IBM DB2 9 Compression Demo IBM
- Yankee Group: Exploring the Benefits of 3G Wireless Integrated into Business-Class Routers Sprint
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET
