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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
White Papers, Webcasts, and Downloads
- The Impact of Virtualization Software on Operating Environments VMware Today's use of virtualization technology allows IT professionals to ... Download Now
- The True Costs of Virtual Server Solutions VMware Discover ways to streamline and simplify your assessment of the total acquisition costs of a server virtualization environment. Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- Five Steps to Determine When to Virtualize YourServers VMware Thinking of virtualizing the servers at your company? Use this step-by-step guide to determine when's the best time to make your big move. Download Now
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
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
Designing the next killer product
Developing new ways to collaborate
Overseeing IT operations across a global organization
The biggest security threats facing companies in 2009
