Jump to content

Au3toCmd -- Avoid false virus positives. (Version: 2022.09.01)


Exit
 Share

Recommended Posts

  • 1 month later...

Hmm I don't get it...

This doesn't seem to work at all.

 

I am using Windows 10 Pro x64 and trying to pack a simple Hello World script fails.

I should see a MessageBox but instead a cmd window pops up and quickly disappears.

When I try to run the file inside a standalone cmd.exe window, it crashes...

 

#include <File.au3>
#include <FileConstants.au3>
#include <InetConstants.au3>
#include <MsgBoxConstants.au3>
#include <TrayConstants.au3>
#include <WinAPIFiles.au3>

MsgBox($MB_SYSTEMMODAL, "Hello World", "Hello World")

 

Link to comment
Share on other sites

  • 2 weeks later...
If Not @Compiled Then
    ; this is simpler and will work fine with portable setups
    $sA3Dir = StringLeft(@AutoItExe, StringInStr(@AutoItExe, '\', 0, -1)-1)
    If $beta Then $sA3Dir &= "\Beta"
    $sA3Ver = StringReplace(FileGetVersion($sA3Dir & "\autoit3.exe"), ",", ".")
Else
    $sA3Dir = RegRead("HKLM\SOFTWARE" & ((@OSArch = 'X64') ? "\Wow6432Node" : "") & "\AutoIt v3\AutoIt", ($beta ? "beta" : "") & "InstallDir")
    $sA3Ver = RegRead("HKLM\SOFTWARE" & ((@OSArch = 'X64') ? "\Wow6432Node" : "") & "\AutoIt v3\AutoIt", ($beta ? "beta" : "") & "Version")
EndIf

.. I think that the above is better. Food for thought. :)

Edit: Fixed the "$beta" part I did not considered when posting.

Edited by argumentum
oops
Link to comment
Share on other sites

  • 1 month later...

A friend of mine still has trouble opening the AutoIt-Script. He was try download a file containing the exe and the cmd - both blocked by Windows/Browser. Is there any way to reduce the risk of the file being flagged as false positive even further? (exe gets flagged by 14/70 and cmd by 5/59 according to VirusTotal)

Link to comment
Share on other sites

4 hours ago, moldevort said:

Is there any way to reduce the risk of the file being flagged as false positive even further?

This question has already been asked many times.

You will find answers in the thread  https://www.autoitscript.com/forum/topic/209561-are-my-autoit-exes-really-infected/

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

On 4/20/2023 at 7:43 AM, Musashi said:

This question has already been asked many times.

You will find answers in the thread  https://www.autoitscript.com/forum/topic/209561-are-my-autoit-exes-really-infected/

 

Thank you for the link. However, this doesn't answer my question - windows itself seems to block the file and I am not willing to upload my file to various antivirus sites whenever I want to change a tiny bit of a code.

I am looking for a workaround

Edited by moldevort
Link to comment
Share on other sites

1 hour ago, moldevort said:

Thank you for the link. However, this doesn't answer my question - windows itself seems to block the file and I am not willing to upload my file to various antivirus sites whenever I want to change a tiny bit of a code.
I am looking for a workaround

I suspect, you didn't read the thread in its entirety ;).

Uploading the file to various antivirus vendors and/or Microsoft is just one way to get whitelisted. This can be an annoying procedure, as you have already written, because firstly you have to wait for the clearance, and secondly the process may have to be redone when changes are made in the code.

 

1. If you want to compile your program as an .exe file (and distribute it to other users), the following instructions may be helpful :

#AutoIt3Wrapper_UseX64 = Y
#AutoIt3Wrapper_UseUpx = N

2. My preferred approach is to compile a script as .a3x. 

#AutoIt3Wrapper_OutFile_Type=a3x ; exe/a3x

Take a look at : comment=1472906

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

On 4/22/2023 at 8:03 AM, Musashi said:

1. If you want to compile your program as an .exe file (and distribute it to other users), the following instructions may be helpful :

#AutoIt3Wrapper_UseX64 = Y
#AutoIt3Wrapper_UseUpx = N

2. My preferred approach is to compile a script as .a3x. 

#AutoIt3Wrapper_OutFile_Type=a3x ; exe/a3x

Take a look at : comment=1472906

 

Thank you for this addition; I already tested disabling UPX, still flagged and making my friends install autoit beforehands is not an option. I will try using the x64 approach

Link to comment
Share on other sites

7 hours ago, moldevort said:

... and making my friends install autoit beforehands is not an option

Info : It is not mandatory to perform a full AutoIt installation on a third party machine to execute .a3x scripts.

It is sufficient, to provide the AutoIt interpreter (i.e. AutoIt3.exe or Au3Info_x64.exe) as standalone files. 

Example :

  • Compile your script as .a3x
  • Copy the AutoIt interpreter and the a3x.script into a directory of your choice
  • Start the script via a .cmd file, via a desktop shortcut or with the respective Execute command from another programming language.  

For this example, we assume that the interpreter and the script are located in the same directory. Otherwise, full path specifications must be given.

@echo off
CLS
cd %~dp0
AutoIt3.exe "my_script.a3x"

An optional passing of command line parameters to the script is supported.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...