Solved

Script for turning on automatic updates

Posted on 2009-04-04
3
1,002 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
Comment Utility
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
Comment Utility
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
Comment Utility
Great, thanks!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

17 Experts available now in Live!

Get 1:1 Help Now