Jump to content

[Help] Trying to contact WSUS Server via batch


Honnes

Recommended Posts

Hello all,

I configured and started a WSUS (Windows Services Update Server) for our network here, but ive got this tiny problem...

I configured everything correct, auto update via the server works, but well, i dont want to change all settings 300 times before all the computers are updated. (ps: its a school network with hd protect cards in it)

I created myself a batch file which should enable and disable the windows update service.

A little bit of the content

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /F
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "AUOptions" /t "REG_DWORD" /d "00000002"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ConfigVer" /t "REG_DWORD" /d "00000001"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ResetAU" /t "REG_DWORD" /d "00000001"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ScheduledInstallDay" /t "REG_DWORD" /d "00000000"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ScheduledInstallTime" /t "REG_DWORD" /d "00000003"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "NextDetectionTime" /t "REG_SZ" /d "2006-02-24 08:34:13"
WUAUCLT.EXE /DETECTNOW
PAUSE
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /F
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "AUOptions" /t "REG_DWORD" /d "00000001"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ConfigVer" /t "REG_DWORD" /d "00000001"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ResetAU" /t "REG_DWORD" /d "00000001"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ScheduledInstallDay" /t "REG_DWORD" /d "00000000"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v "ScheduledInstallTime" /t "REG_DWORD" /d "00000003"

When i use this, the registry is being modified and with the /detectnow switch, you force the comp to connect with the server, but the NextDetectionTime doesnt change at all then...which is kinda odd.

(after the pause (and when you installed the updates, you press a key and the auto updates are inactive again))

When i do these steps manuel (via Automatic Updates configer and select the option 'message before download/install' and I press OK and do that detectnow), it does work.

Does someone has an idea of whats going wrong ? Have i forgot a reg. key, or wont this work at all ?

Thanks in advance ! (ps: Im updating per classroom, and please dont tell me things like, never activate that hd protect card again and set auto updates on on or so. thanks.)

[edit] My batch does work when i first reboot and later deactivate the auto updates again (did that with the %1 parameter). I can live with that, but if someone knows how to fix this without reboot, that would be great ! [/edit]

Title edited -- Please, use [TAGS] in your topic's title.

Follow new rules

--Sonic

Link to comment
Share on other sites


You're in the wrong section of the registry. All WSUS settings need to be handled through the policies registry key. If you edit these keys directly you also need to restart the service for the new values to take effect.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...