Author Topic: Nag Icon Win10  (Read 10762 times)

0 Members and 1 Guest are viewing this topic.

Offline george27

  • Newbie
  • *
  • Join Date: Feb 2014
  • Posts: 5
  • Karma: 0
    • View Profile
Nag Icon Win10
« on: June 06, 2015, 11:16:23 am »
I ran this your batch file

Echo off

taskkill.exe /F /IM "gwx.exe"
takeown /f "%windir%\System32\GWX" && icacls "%windir%\System32\GWX" /grant administrators:F
ren "%windir%\System32\GWX\" "GWX_Old"

exit

It kills gwx.exe but doesn't rename to GWX_Old. I am the admin and have full rights. Manually rename should be fine?

Offline Julian

  • "Professional Googler"
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jun 2015
  • Posts: 1325
  • Location: USA, New Mexico
  • Karma: 38
    • View Profile
Re: Nag Icon Win10
« Reply #1 on: June 06, 2015, 01:11:37 pm »
did you download the batch file or create one on your computer with the script? Windows likes to block batch files from other computers    :smiley:
If you downloaded the batch file right click go to properties under the general tab click unblock see what that does for you. or you can copy

Echo off

taskkill.exe /F /IM "gwx.exe"
takeown /f "%windir%\System32\GWX" && icacls "%windir%\System32\GWX" /grant administrators:F
ren "%windir%\System32\GWX\" "GWX_Old"

exit

then open notepad.exe paste save as remove10nag.bat

let me know what that does for you.
Julian

Offline george27

  • Newbie
  • *
  • Join Date: Feb 2014
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Nag Icon Win10
« Reply #2 on: June 06, 2015, 01:35:44 pm »
I created the bat file myself, tried it again and still a no go.

Offline Julian

  • "Professional Googler"
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jun 2015
  • Posts: 1325
  • Location: USA, New Mexico
  • Karma: 38
    • View Profile
Re: Nag Icon Win10
« Reply #3 on: June 06, 2015, 04:15:52 pm »
okay I revamped the command a little bit.... looks like ren messed up and Could not find the path.  been awhile since I used these commands but copy paste to remove and ill paste a fix to bring it back

copy paste into a wordpad save as .bat

Echo off

taskkill.exe /F /IM "gwx.exe"
takeown /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"

exit


To bring it back

robocopy "%windir%\System32\GWX_Old" "%windir%\System32\GWX" /E
rmdir /s /q "%windir%\System32\GWX_Old"
%windir%\system32\GWX\GWX.exe /tasklaunch

now lets see if that did it :D
« Last Edit: June 06, 2015, 05:31:08 pm by Sundavor »
Julian

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1165
  • Karma: 18
    • View Profile
Re: Nag Icon Win10
« Reply #4 on: June 07, 2015, 12:28:45 am »

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Nag Icon Win10
« Reply #5 on: June 08, 2015, 07:27:52 pm »
Quote
It kills gwx.exe but doesn't rename to GWX_Old. I am the admin and have full rights. Manually rename should be fine?

Yes manually renaming it should be fine.

I wonder why ren was having a hard time with the path, worked fine on my system but maybe something else is going on. If you remove the echo off and put the word pause at the end of the bat file instead of exit it will keep the cmd window open ad we can see what errors it shows, I would like to see those so I can update the bat file :-)

Shane

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Nag Icon Win10
« Reply #6 on: June 08, 2015, 08:42:11 pm »
So get this, I am testing out the bat file again, this time on windows 8.1 in vmware. The command ren or rename simply refuses to see the GWX folder, yet I can make a folder called GWX2 in the system32 folder and ren has no trouble seeing it and renaming it. Yet it refuses to work on the main GWX folder, I even changed all the permissions on the folder and it still wont take.

So either MS put something in that makes ren not see the folder or something else is going on. I will let you know what I find out, I am also going to try Sundavor script of using robocopy to copy the files to the folder and then remove the old one.

Shane

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Nag Icon Win10
« Reply #7 on: June 08, 2015, 08:45:57 pm »
Sundavors script works, while ren has been blocked the robocopy and rmdir commands have not. So great find on this one Sundavors :wink:

So I will update the page and bat file with the new script, I also changed the take ownership command as well, here will be the new script

Code: [Select]
Echo off

taskkill.exe /F /IM "gwx.exe"
takeown /a /r /skipsl /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"

exit

Shane
« Last Edit: June 09, 2015, 10:37:20 am by Shane »