Solved

Script for turning on automatic updates

Posted on 2009-04-04
3
1,014 Views
Last Modified: 2012-05-06
Hi Experts,

I need a script (VBS?) to send out to XP clients via Altiris to turn on Automatic Updates.
0
Comment
Question by:Sparkle101
3 Comments
 
LVL 3

Expert Comment

by:ddanonimity
ID: 24067628
try putting this in a BAT file and schedule it

wuauclt.exe /detectnow
0
 
LVL 14

Accepted Solution

by:
BigBadWolf_000 earned 250 total points
ID: 24067776
Use the script below...the first part of the script makes sure that the AutoUpdates service is turned on and set to "automatic"...the second part (after next) turns autoupdate 'On' in the control panel app...
strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colServiceList = objWMIService.ExecQuery _

("Select * from Win32_Service where Name='wuauserv'")

For each objService in colServiceList

call objService.Change( , , , , "Automatic")

objService.StartService()

Next
 

Const AU_Enabled = 4

Set objAutoUpdate = CreateObject("Microsoft.Update.AutoUpdate")

Set objSettings = objAutoUpdate.Settings

objSettings.NotificationLevel = AU_ENABLED

objSettings.Save
 

Set objWMIService = Nothing

Set colServiceList = Nothing

Set objAutoUpdate = Nothing

Set objSettings = Nothing

Open in new window

0
 
LVL 2

Author Closing Comment

by:Sparkle101
ID: 31566590
Great, thanks!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now