Wuauclt cmd line problems (bat file)

Hello all,

i have some problems with wuauclt, which i cannot explain myself. Hopefully you can help me out.

So i try to force updates over wuauclt on client pc's, which is made by a simple .bat - scheduled by the windows task scheduler.

It seems that all is working fine for now, but in the end i don't know why one update is not installed by the .bat .

To show what the .bat will do, here the code :

@echo off
echo --------------------------------------------------- >> C:\vmlog.txt
echo Update_ausgefhrt >> C:\vmlog.txt
echo %Computername%_%time:~0,2%%time:~3,2%_%DATE:/=% >> C:\vmlog.txt
echo --------------------------------------------------- >> C:\vmlog.txt
start "update" /wait "c:\windows\system32\wuauclt.exe" /resetauthorization /detectnow 
start "update" /wait "c:\windows\system32\wuauclt.exe" /updatenow 

Simply, some log infos before the update push starts.

It works till now, because when i look into the gui i can see there are 2 Updates left to install.

But i can do what i want, it doesn't install the remaining updates. Following Updates are still in "important"

checked : KB890830 (removal Tool)

unchecked : .NET Framework 4.5.1 for Win 7 KB2858725

Even if i run cmd as admin and type "wuauclt /updatenow" it won't work.

Also when i stop and start the windows update service again, to re-initiate it - same problem.

My goal is to get a 100% up2date windows as far as possible. This means, if any updates are installable, it should be done.

Do you can help me out, why windows don't install the updates by command line ?

I don't want to use the gui, it has to be solved by .bat

Thanks a lot !

Holger

So here my question again, this time the correct forum :)

Thanks for any help !

  • Moved by Bill_Stewart 17 hours 44 minutes ago Move to more appropriate forum
January 21st, 2014 11:31am

Hi,

start "update" /wait "c:\windows\system32\wuauclt.exe" /updatenow

This is an undocumented and ineffective command line.
I have never, ever seen this command working.

To force a computer too install updates, you can :
- Set a deadline to these updates. But be aware that these deadlines will apply to all computers that need these updates. And there is some serious drawbacks (reboot behaviors).
- Use Windows Update Agent API. See UpdateHF.vbs http://community.spiceworks.com/scripts/show/82-windows-update-agent-force-script-email-results-version-2

January 21st, 2014 1:39pm

Thanks for the reply David,

i tested both cmd lines - /detectnow and /updatenow on several pc's , because i was also unsure about the behavior. Both works for me fine, but i would like to know why it is ineffective ?

Being aware of, that i'm no professional in scripting, i thought it's enough to do the simple job and push the update.

One last thing is, why /detectnow - /updatenow do not install all updatest in the important category ?

There are 2 still left and won't be updated, untill i press the gui button. I listed both KB's in the first post.

Thanks for help :)

January 22nd, 2014 3:20am

Ok solved this by myself.

Just for information : it seems that after service restart & deleting the temp files, the problem get solved and updates are performed by both commands.

Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2014 6:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics