Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - stop and start windows update service

Reply
 
Old 12-17-2008   #1 (permalink)
James Bond


 
 

stop and start windows update service

How do I stop and start windows update service on Windows Vista ?

My System SpecsSystem Spec
Old 12-17-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: stop and start windows update service


"James Bond" <jbond@xxxxxx> wrote in message
news:uytSoQEYJHA.2620@xxxxxx
Quote:

> How do I stop and start windows update service on Windows Vista ?
Maybe the same way as in earlier versions of Windows: net stop "Automatic
Updates". I would repost the question in a Vista newsgroup - it is not
really relevant in a VB Script newsgroup.


My System SpecsSystem Spec
Old 12-17-2008   #3 (permalink)
mayayana


 
 

Re: stop and start windows update service

As Pegasus said, you're in the wrong group
unless you want to do it via script. If so,
you need WMI.

Here's some "air code" to do it. I can't vouch for
total accuracy, as it's still early in the morning
for me and I just pulled this code out a larger script:

sStartName = "wuauserv"

Set WMI = GetObject("WinMgmts:")
Set oServ2 = WMI.Get("Win32_Service.Name='" & sStartName & "'")
iRet = oServ2.ChangeStartMode("disabled")
If (oServ2.State = "Running") Then iRet2 = oServ2.StopService
Set oServ2 = Nothing
Set WMI = Nothing

For more details see www.jsware.net/jsware/xpfix.php5
The "XPFix" download there includes an HTA GUI program
for cleaning up unnecessary services. The file XPFixOpsS.vbs,
in the download, is where the code is for checking, starting,
stopping and changing services status. Note, though, that
WMI is not foolproof. I've found that some services set to
disabled somehow get started again, even though they may
not be necessary services. I haven't taken the trouble to
research exactly which services are problematic that way,
but I think it's a good idea to keep an eye on services that
you *think* are under your control.
Quote:

> How do I stop and start windows update service on Windows Vista ?

My System SpecsSystem Spec
Old 02-02-2009   #4 (permalink)


Vista 32bit
 
 

Re: stop and start windows update service

is there any way to run this code as an admin, i need to run it as a startup script in group policy, however it wont run as users dont have admin permission.

any help would be much appreciated as been looking everywhere.

thanks


sStartName = "wuauserv"

Set WMI = GetObject("WinMgmts:")
Set oServ2 = WMI.Get("Win32_Service.Name='" & sStartName & "'")
iRet = oServ2.ChangeStartMode("disabled")
If (oServ2.State = "Running") Then iRet2 = oServ2.StopService
Set oServ2 = Nothing
Set WMI = Nothing
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
WLAN AutoConfig won't start | Windows Wireless Service won't start.... Network & Sharing
Windows Update service won't start. Vista General
cannot find an update windows update for service pack 1 for x64 Vista General
How is it possible to execute start-service and stop-service through a Web-interface? PowerShell
NET START STOP Service Command Line Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46