Solved

Script for turning on automatic updates

Posted on 2009-04-04
3
1,024 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

825 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