DesireDenied Posted July 26, 2020 Posted July 26, 2020 (edited) Hey guys, I having some hard times getting false-positive, probably because I am trying to execute my AutoUpdater. Here is my code: Global $iUpdateTimer = 0 While 1 checkUpdates(10) WEnd Func checkUpdates($iDelay = 10) $iDelay = $iDelay * 1000 * 60 If TimerDiff($iUpdateTimer) > $iDelay Then ConsoleWrite('checking for updates...' & @CRLF) $iUpdateTimer = TimerInit() If FileExists('AutoUpdater.exe') Then ShellExecuteWait('AutoUpdater.exe') ; this is the line which cause my problem EndIf EndFunc And AutoUpdater code: #include <MsgBoxConstants.au3> #include <FileConstants.au3> Global $sExecName = 'test.exe' Global $sUpdatePath = @UserProfileDir &'\desktop\AnyAppName\update\'& $sExecName Global $sUserPath = @UserProfileDir &'\desktop\AnyAppName\'& $sExecName Global $sCopyright = 'someUniqueStringHere' If Not FileExists($sUpdatePath) Then Exit 0 If FileGetVersion($sUpdatePath, $FV_LEGALCOPYRIGHT) <> $sCopyright Then Exit 0 ; checking if we really want to update and execute the file If FileGetVersion($sUpdatePath) > FileGetVersion($sUserPath) Then $iResponse = MsgBox(BitOR($MB_YESNO, $MB_ICONQUESTION),'AnyAppName', 'There is an update available, would you like to update?') If $iResponse == $IDYES Then If ProcessExists($sExecName) Then ProcessClose($sExecName) Sleep(500) EndIf FileCopy($sUpdatePath, $sUserPath, $FC_OVERWRITE) Sleep(3000) ShellExecute($sUserPath) Exit 1 EndIf EndIf Exit 0 I am not trying to ask, why is my code is getting recognized as false-positive, because this is quite obvious, but is there any other way to get things done without running external process? Edited July 26, 2020 by DesireDenied
Developers Jos Posted July 26, 2020 Developers Posted July 26, 2020 Maybe a good place to start reading first: DesireDenied 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
DesireDenied Posted July 26, 2020 Author Posted July 26, 2020 (edited) thanks Jos, it is really good place to start but I have already read this. the problem is, I dont want to indicate my AutoUpdater as false-positive on every single workstation in my company. just wondering if there is any other way to autoupdate my compiled script file. I can always wait till the end of the day, and then manually update all the copies of my compiled script but I am not really satisfied with this option. Edited July 26, 2020 by DesireDenied
argumentum Posted July 26, 2020 Posted July 26, 2020 ..exempt the folder where your software resides, in the AV software used by your company. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Developers Jos Posted July 26, 2020 Developers Posted July 26, 2020 Is your first script also compiled and ran on those pc's and not giving any error? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Nine Posted July 26, 2020 Posted July 26, 2020 The script could set itself in the whilelist of the AV, so you do not have to perform this task manually. Shouldn't be too much of a problem to program it. Once it is done, then run your autoUpdater. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Exit Posted July 26, 2020 Posted July 26, 2020 4 hours ago, DesireDenied said: is there any other way to get things done without running external process? Just try Au3toCmd DesireDenied 1 App: Au3toCmd UDF: _SingleScript()
DesireDenied Posted July 27, 2020 Author Posted July 27, 2020 (edited) I made a lot of noise around the topic, but today when I got back to work, everything seems completely fine. I have just changed one line: ; orignal line If FileExists('AutoUpdater.exe') Then ShellExecuteWait('AutoUpdater.exe') ; changed to If FileExists('AutoUpdater.exe') Then RunWait('AutoUpdater.exe') and the false-positive is gone. Thank you guys for all your help, especially @Exit - will try this one. By the way, we are using ESET Antivirus, if someone is interested. Edited July 27, 2020 by DesireDenied
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now