I see, it is an SFK type of EXE, that is a very neat solution you have made, I like it a lot
And it's good that you can just extract an SFK archive with WinRAR or 7-Zip to see what it is, I remember doing similar back in NT4 era... Happy days
However I think I would like it to not depend on PowerRun (not that I have anything against PowerRun, it's just my end users might not know what it is if they or thier AV came accross it), and also I will like to inlcude the other winsxs folder entries I have encountered on my test systems.
So I would like to run the commands as an elevated plain old .BAT batch startup script, during Windows post installation (RunOnce)...
To remove the winsxs folder(s), I adapt your command to:
Code:
takeown /a /r /d Y /f "C:\Windows\winsxs\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8"
icacls "C:\Windows\winsxs\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8" /T /C /grant administrators:D
rmdir /s /q "C:\Windows\winsxs\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8"
(I would like it if this code was made to use wildcards to get the other versions, but takeown and icacls do not support wildcards, so I have to repeat all the above 4 times)
To delete the eosnotify winSxS module manifest(s), I adapt your command to:
Code:
takeown /a /f "C:\Windows\winsxs\Manifests\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8.manifest"
icacls "C:\Windows\winsxs\Manifests\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8.manifest" /grant administrators:D
del /s "C:\Windows\winsxs\Manifests\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_6.1.7601.24544_none_44332005faee77b8.manifest"
To delete the actual EOSNotify binary EXE, I adapt your command with additional commands like this:
Code:
taskkill /F /IM "C:\Windows\System32\EOSNotify.exe"
takeown /a /f C:\Windows\System32\EOSNotify.exe && icacls C:\Windows\System32\EOSNotify.exe /grant administrators:D
del /s C:\Windows\System32\EOSNotify.exe
Regarding the .inf file, this is easy to delete, however I was wondering if it is best to leave it on the system? Because after setting the "DiscontinueEOS" registry value I think a setting gets saved in there too, and perhaps this will help to prevent the Microsoft Windows 7 End Of Service Notifier (EOSNotify) from being activated in the future (such as if it were reinstalled by a future critical update, for example).
Of course, I also add the registry values to the Script to provide future protection against EOSNotify invokation, in addition to your command to remove the application manifest, as follows:
Code:
ECHO Removing EOSNotify system loaded module registry entry...
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners\amd64_microsoft-windows-eosnotify_31bf3856ad364e35_none_cf9552e0f1896db2 /f
ECHO Adding EOSNotify system registry entries to indicate GWX aka Get Windows 10 opt-out...
REM see KB4524752
reg add HKLM\Software\Policies\Microsoft\Windows\Gwx /v DisableGwx /t REG_DWORD /d 1 /f
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v DisableOSUpgrade /t REG_DWORD /d 1 /f
ECHO Adding EOSNotify user registry entries to indicate EOSNotify aka End Of Service Notfier opt-out...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\EOSNotify /v DiscontinueEOS /t REG_DWORD /d 1 /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\EOSNotify /v Discontinue /t REG_DWORD /d 1 /f
This provides protection for exisiting versions of EOSNotify nagware, but I wonder if there can be an improvement to resist future versions of the the nagware? It is unfortunate that takeown and icacls do not support wildcards, perhaps there are other commands that can be like *eosnotify_*?
All the above code snippets can simply be run inside a batch file, such as the one I have attached here.
The forums don't allow .exe to be uploaded, so you'll have to unzip this and then run the
EOSNotify-Uninstall.BAT file (as an Admin).
Can I ask, does the post setup part of NTLite run the programs/batch scripts in there with Administrive privaliges?