Telenut Posted October 12, 2005 Share Posted October 12, 2005 Hi, I use a bat script to install all windows updates. It also includes windows update V6. But I can't find out a way to see if this is already on the system. I coud use IF NOT EXIST c:\?????? WUv6.exe /wuforce /quiet /norestart or REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\????" > nul 2>&1 IF %ERRORLEVEL% EQU 0 ( WUv6.exe /wuforce /quiet /norestart Just need to find out what the ?????? must be... Link to comment Share on other sites More sharing options...
muiz Posted October 12, 2005 Share Posted October 12, 2005 Hi, I use a bat script to install all windows updates. It also includes windows update V6. But I can't find out a way to see if this is already on the system. I coud use IF NOT EXIST c:\?????? WUv6.exe /wuforce /quiet /norestart or REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\????" > nul 2>&1 IF %ERRORLEVEL% EQU 0 ( WUv6.exe /wuforce /quiet /norestart Just need to find out what the ?????? must be...just go to windows update site Link to comment Share on other sites More sharing options...
Yzöwl Posted October 12, 2005 Share Posted October 12, 2005 Why not just check the file version of one of its installed components.From WU5 the file version is usually something like 5.4.3790.2182 or whereas in WU6 the file version is 5.8.0.2469. As the new version is known, test for it, and run the install if unsuccessful.In order to check a file version the easiest method would be to use vbscript. If we wrap it in a cmd and run it, it should work fine.:: IfOldVer.cmd - Yzöwl ©2005:: Runs a command upon incorrect file version::@ECHO OFFSETLOCALECHO SET objFSO = CreateObject("Scripting.FileSystemObject") >_temp.vbsECHO Wscript.stdout.write objFSO.GetFileVersion("%SystemRoot%\system32\wuapi.dll") >>_temp.vbsFOR /F %%a IN ('CSCRIPT /NOLOGO _temp.vbs') DO IF "%%a" NEQ "5.8.0.2469" START WUv6.exe /wuforce /quiet /norestartDEL _temp.vbsENDLOCALGOTO :EOF Link to comment Share on other sites More sharing options...
muiz Posted October 12, 2005 Share Posted October 12, 2005 why do all those time consuming things???go to windows update site and you see if its installed or not Link to comment Share on other sites More sharing options...
Raja Posted October 13, 2005 Share Posted October 13, 2005 Another option if u must use batch file, you can check for the file size or the date stamp. Below is the example for Notepad.exe which has file size of 69,120 bytes.dir %windir%\notepad.exe|find "69,120"if errorlevel 0 if not errorlevel 1 echo "Version is correct" Link to comment Share on other sites More sharing options...
Telenut Posted October 13, 2005 Author Share Posted October 13, 2005 thx Yzöwlworks perfect! (and I have learned something new) Link to comment Share on other sites More sharing options...
scp Posted October 13, 2005 Share Posted October 13, 2005 What aboutIF NOT EXIST %SystemRoot%\system32\LegitCheckControl.DLL WUv6.exe /wuforce /quiet /norestart Link to comment Share on other sites More sharing options...
Telenut Posted October 13, 2005 Author Share Posted October 13, 2005 I'm not sure of that file is part of the windows update V6.If it is, it would work too I guess.Thx for the tips guys. Link to comment Share on other sites More sharing options...
Yzöwl Posted October 13, 2005 Share Posted October 13, 2005 @ scphave you ever wondered why some people are just 'too clever' to see something right under their own nose! Another option if u must use batch file, you can check for the file size or the date stamp. Below is the example for Notepad.exe which has file size of 69,120 bytes.dir %windir%\notepad.exe|find "69,120"if errorlevel 0 if not errorlevel 1 echo "Version is correct"This is what I would usedir/-c "%windir%\notepad.exe"|find "69120 bytes">nul||echo/incorrect version Link to comment Share on other sites More sharing options...
-.-PhanTom-.- Posted October 16, 2005 Share Posted October 16, 2005 Curious..where did you get the WUv6.exe file? Link to comment Share on other sites More sharing options...
Telenut Posted October 16, 2005 Author Share Posted October 16, 2005 found it somewhere on this forum. But I'm not able to find it back now :-) Link to comment Share on other sites More sharing options...
-.-PhanTom-.- Posted October 16, 2005 Share Posted October 16, 2005 Hmmm ****.. anyone else?Really want to be able to have windows update "updated" upon first load... Link to comment Share on other sites More sharing options...
Telenut Posted October 16, 2005 Author Share Posted October 16, 2005 here you go:http://www.telenut.be/WUv6.exe Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now