semazurek / ET-Optimizer

ET is a powerful application to improve performance, debloat, optimize and enhance privacy for Windows 10/11.
GNU General Public License v3.0
316 stars 26 forks source link

Antivirus Software blocking script. #17

Closed semazurek closed 10 months ago

semazurek commented 1 year ago

Apart from the fact that it is recommended to make a backup and turn off the antivirus, the problem occurs with antiviruses mainly in the .ps1 file, not the old .bat version.

More precisely, antiviruses block lines of code such as:

This part of the script re-run script as an Administrator with -RunAs

 Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))

This part of the script brings up a message box (This has already been replaced and fixed)

(New-Object -ComObject Wscript.Shell).Popup("""%announcement%""",0,"""%version%""",0x10 + 4096)

So far, other parts of the code do not cause the above-mentioned problems in the operation of the script.

On the one hand, .bat files are either a high threat to antiviruses, and on the other hand, they are completely invisible to them what they hide inside, because in version 5.2 of the script, the implementation of the GUI code was done on the principle of one script in another [ BAT (PS1) ]

I am still working on a solution. The only thing so far is to add a line to the code:

#Requires -RunAsAdministrator

The downside of this solution is that the user have to manually run powershell console as an administrator and execute the .ps1 script I don't see any more advantages... I will gladly accept any advice.

image