Solved

Script for turning on automatic updates

Posted on 2009-04-04
3
1,040 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 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