Instead of maintaining different version of the script testing the windows buidnumber could make it possible to bypass unnecessary coding : Code: rem Get Windows OS build number for /f "tokens=2 delims==" %%G in ('wmic path Win32_OperatingSystem get BuildNumber /value') do ( set /a WinBuild=%%G ) (for windows 7 = 7601)
yay but now all issues is very very more frequent with W10 Systems so... ah! only remembering you and pf100 thinks over all "unespected behaviours inside of WU or WUSA or I'am wrong bro you are the man +pf100 related to this section inside of newWindows O.S maybe ous need rewrite code for !W10 works CORRECT?
That would be the best way to do it. "If not Windows 10, don't disable files." Everything else would remain unchanged as far as I know. Edit: On second thought, what's wrong with the latest script? It just runs a lot of unnecessary code but is otherwise harmless to windows 7. It doesn't disable any files that I know of as is, so it has all the benefits without any real drawbacks. What are your thoughts on this? Never mind.
Yes, no need to bypass code trying to process files which don't exist! Sometimes i run a W7 ultimate in a Virtualbox. The av program is Microsoft Security Essentials and the service name is MsMpSvc - and not windefend - (afaik defender wasn't free with w7) : even if wuauserv is stopped and disabled, definitions updates can be done. But, in any event, i would apply what i said in post 458 (and this is what i do).
I understand what you and everyone else is saying now. I'll make a new version based on your post just for Windows 7. I know you're saying that's not necessary but I don't mind. Thanks. Edit: @rpo, I edited what you posted here with the wub.exe check code in case someone copies this over a newer version and am using it as the core for v2.1.7.7 for Windows 7, as shown below: Code: @echo off if exist "%~dp0wub.exe" if exist "%~dp0wub.exe-backup" del "%~dp0wub.exe-backup" /f /q >nul 2>&1 ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1 "%~dp0wub.exe" /e for /f "tokens=2 delims==" %%a in ('wmic cpu get AddressWidth /value') do (set arch=%%a) IF %arch% == 32 (set "wumt=%~dp0wumt_x86.exe") else (set "wumt=%~dp0wumt_x64.exe") Start "" "%wumt%" -update "-onclose %~dp0wub.exe /d /p"
v2.1.7 works fine and i always check that windows update is disabled when i close the tool, no problems yet. I prefer to have a single version of a tool that works on every os i use. I havnt put 236 onto an online system yet but i plan to in the next few weeks, or a newer version if its out. Thanks for your input guys, i will be coming back to this in a few weeks, gotta loton
@pf100 and Skunk1966, v217 works, but under these conditions. I use 2 different w7 configurations, 1 - Original iso updated with kb3125574 and its preprequisites, and .net 472. 2 - Original iso updated with kb3125574 and its preprequisites, .net 472, updates up to dec 2016 or the month before ms started blocking updates on certain systems. Under these 2 circumstances 217 works fine but it may not if ms sneakily changed things since then. I dont use the script to its full capability either. I only use WU with the script, never on its own. When i do use it is only on a test install to check for updates. I browse the updates, cherry pick what i want then save the download links and manually download them. Then i add them to the install one at a time. If it breaks something, i discard it. If its ok then i save it so i can either slipstream it or add it to the oems folder to install during setup. Repeat as necessary. So far i only use the windows update option but i may start doing it all in offline mode so i can download it all from Linux. The script is one of the most valuable tools in my armoury.
Ive copied the code for 2.1.7.7 and will give it a try soon. Because i dont use it or WU to download or update the system i will stick to 2177 instead. I will bake it into iso's and dvd's so its always availible. Thank you pf100. Ive added the new cmd file into my 217 pack and renamed it to 2177.
When i finally switch to windows for my workstation and linux for online work then i wont have to worry about keeping windows up to date.
I'll look for my file and send you the link to the file by pm (it's a .doc file with all steps and list of updates to avoid in windows 7/8/8.1)
Thank you I am in no rush with tons of things to do so as and when you can will be great, thanks again.