Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Remove Win 10 Flag Icon - Script

  • Please log in to reply
2 replies to this topic

#1 Seaner992


  • Members
  • 2 posts
  • Gender:Male
  • Local time:07:13 PM

Posted 10 August 2015 - 10:21 AM

I created a batch script that disables the white Windows flag icon that is in the tray. I thought I would share it to save others' time. Just right click on the script, the left click 'Run as administrator'. You may need to hover over the icon after running this script to make it disappear.




Here it is. I also attached it.

@echo off
cls & echo.

set Dir="C:\Windows\System32\GWX"

if exist "%Dir%" (
:: Get Permission
takeown /F "%Dir%" /A /R >nul 2>&1
icacls "%Dir%" /grant Everyone:M /T >nul 2>&1

:: Stop Services & Processes
cls & echo [-] Stopping Processes & echo.
sc stop "wuauserv" >nul 2>&1
taskkill /im "GWX.exe" /f /t >nul 2>&1
taskkill /im "GWXUX.exe" /f /t >nul 2>&1
sc stop "wuauserv" >nul 2>&1
taskkill /im "GWX.exe" /f /t >nul 2>&1
taskkill /im "GWXUX.exe" /f /t >nul 2>&1

:: Disable In Reg
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Gwx" /v DisableGwx /t REG_DWORD /d 1 /f >nul 2>&1

:: Delete Files
cls & echo [-] Deleting Files
rd /s/q "%Dir%" >nul 2>&1

:: Restart Updates
cls & echo [-] Restarting Windows Updates
sc start "wuauserv" >nul 2>&1
) else echo   Flag Already Disabled


Attached Files

Edited by hamluis, 10 August 2015 - 12:48 PM.
Moved from Win 10 to Tips/Tricks - Hamluis.

BC AdBot (Login to Remove)


#2 hamluis



  • Moderator
  • 56,385 posts
  • Gender:Male
  • Location:Killeen, TX
  • Local time:06:13 PM

Posted 10 August 2015 - 12:47 PM

Seems to me that no script is necessary to effect removal, just glancing at Google results.



#3 Seaner992

  • Topic Starter

  • Members
  • 2 posts
  • Gender:Male
  • Local time:07:13 PM

Posted 10 August 2015 - 01:06 PM

I figured it would be easier/faster to script the process, then to manually do them; especially if multiple machines need to be changed.


Thank you @hamluis for moving this to the correct forum location.

Edited by Seaner992, 10 August 2015 - 01:18 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users