Script to remove windows updates through GFI

drjones

Well-Known Member
Reaction score
28
I thought I'd share the following scripts that I've tested on over a dozen machines and successfully used to remove the Windows 10 nag icon and KB3097877 which causes MS Office programs to freeze / not respond / crash.

The best part is you can upload these into your GFI dashboard as an automated task & run it whenever you want without having to touch the client workstation & of course easily run it on multiple workstations in no time!

Steps:

1. In your GFI Control Panel, click Settings / Manage User Scripts.

2. Click "New", enter the "Description" and "Usage" however you like - it's simply for your use / identification of the script.

3. Check the box for Windows, check the box for "Automated Task (Windows only)" Do NOT check the box for "Script Check."

4. Browse to the script files wherever you have them saved. (I'll give you the actual script below).

5. Select & save the script. It is now saved in your script list.

6. Click "Settings / Monitoring Templates / Manage Templates"

7. Click "Add / Add Workstation monitoring template."

8. Give it whatever name you like.

9. Check the box to enable it.

10. Under "Checks and Tasks" click the "Add" button, "Add Automated Task"

11. Click "select script" drop-down menu & scroll to the script you named & uploaded previously. Again give it whatever descriptive name you like. Leave "command line" blank.

12. Click Next. I strongly suggest you set the "Frequency Method" to MANUAL.

13. Click Next, Finish, close out of all open dialog boxes.

14. You can now apply that monitoring template to whichever clients & workstations you like. I spent 4 min & applied it to ALL my workstations because I've been getting so many (around a dozen or more) calls about Office crashing due to that f-ing KB3097877.

15. Run the task whenever you like.


Now I'll give you the scripts that I have first tested on several Win7 VMs, then manually tested on physical machines, then physically / manually tested on a low-priority client workstation, THEN tested again through GFI. I've not encountered a single issue or problem whatsoever, but I can't be held responsible for any problems you encounter, blah, blah, blah.....


This script will remove ANY Windows Update you designate. Simply replace 3097877 with the KB number of whatever Windows patch you like.

@echo off
Set Patch=%1 WMIC QFE GET HOTFIXID | find "3097877"
if not %errorlevel% == 0 Echo Patch not detected
if not %errorlevel% == 0 Exit 0
if %errorlevel% == 0 Echo Patch detected, uninstalling ...
wusa /uninstall /kb:3097877 /quiet /norestart​


This script will remove the Windows 10 nag icon. I dunno bout you guys, but on a lot of workstations, even after manually removing the


Source: http://www.tweaking.com/articles/pages/remove_windows_nag_icon_to_upgrade_to_windows_10,1.html

Echo off

taskkill.exe /F /IM "gwx.exe"
takeown /a /r /d Y /f "%windir%\System32\GWX" && icacls "%windir%\System32\GWX" /grant administrators:F
robocopy "%windir%\System32\GWX" "%windir%\System32\GWX_Old" /E
rmdir /s /q "%windir%\System32\GWX"

takeown /a /r /d Y /f "%windir%\System32\Tasks\Microsoft\Windows\Setup\GWXTriggers" && icacls "%windir%\System32\Tasks\Microsoft\Windows\Setup\GWXTriggers" /grant administrators:F
rmdir /s /q "%windir%\System32\Tasks\Microsoft\Windows\Setup\GWXTriggers"

exit​
 
No need to pull KB3097877 ...the original "bad" patch was released on Tuesday...pulled late Tuesday....and then a new "fixed" patch by the same KB number was released late Wednesday..so by/after Thursday, any machines downloading and installing KB3097877 didn't have that Outlook hang issue.

Any KB3097877 updates after that Thursday, I forget the date...no problem, can install them.
 
Back
Top