?
Solved

Script for turning on automatic updates

Posted on 2009-04-04
3
Medium Priority
?
1,055 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 1000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

762 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