Recently Browsing 0 members
No registered users viewing this page.
Au3toCmd --- Avoid false virus positives
Since many virus scanners sometimes prevent a "compiled autoit EXE" from being executed as "false positive", the "*.A3X" format is a suitable format to avoid this problem.
See here for more information.
In order to simplify this procedure, I wrote the Au3toCmd script. Here a *.Cmd file is generated from a *.Au3 file. The necessary files Autoit3.exe and *.A3x are added to the "*.Cmd" file as "alternate data streams" "Base64" encoded data.
Now the Autoit Script can be called by clicking on the cmd file and the anti-virus scanners do not recognize the "false positive".
If the short-term flashing of the CMD window bothers you, you can click the desktop shutcut that runs in a minimized window.
Unfortunately, because the "alternate data streams", this CMD file cannot be distributed via FTP or email.
Only a USB sti ck or removable disk formatted with NTFS can be used.
As the new version now uses Base64 data instead of ADS, this statement is out of date.
For reasons of compatibility, the old version was sunk into the spoiler here.
The script can be called with a file name of an AU3 script as a parameter.
If no name is entered, a query is made.
For more information, see the header of the script.
Suggestions, improvements and bug reports are welcome.
Here the versions using base64 data
Version: 2022.05.12 (Support blanks in pathnames)
Version: 2022.06.23 (Support release candidates. Changed @CrLf to @Lf. Annual cleaning. Optimized #AutoIt3Wrapper handling)
Version: 2022.07.22 (Support scripts with the same name but different content in different directories)
Version: 2022.07.27 (Support blanks in usernames)
Version: 2022.09.01 (Optimized annual cleaning)
I need help dealing with a C++ DLL
Specify that I need help with how to use this function
struct libusb_device; typedef struct libusb_context libusb_context; ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx,libusb_device ***list); My problem is how to deal with "libusb_device ***list"
$libusb_device = DllStructCreate("PTR") Func libusb_init() $Var = DllCall($libusb0, "ptr", "libusb_init",'ptr',$_libusb_device_handle_Ptr) If @error Then Return False Return $Var EndFunc Func libusb_get_device_list() MsgBox(0,VarGetType($_libusb_device_handle_Ptr),$_libusb_device_handle_Ptr) $Var = DllCall($libusb0, "int", "libusb_get_device_list","ptr",$_libusb_device_handle_Ptr,"ptr*",POINTER(POINTER($libusb_device))) $Error = @error If $Error Then Return False MsgBox(0,VarGetType($Var),$Error&@CRLF&$Var) _ArrayDisplay($Var) Return $Var EndFunc
iLibUSB.dll iLibUSB_32.dll libusb.h
In the course of my research for a project involving, among other things, the transfer of large amounts of data, I came across the BITS service and from that the idea for this UDF was born.
For a brief overview, I'll quote from Microsoft's BITS website (https://docs.microsoft.com/en-us/windows/win32/bits/background-intelligent-transfer-service-portal).
The BITS UDF can be downloaded from my GitHub repository:
Currently, only an alpha version of the UDF is available.
This contains by and large the full functionality of the object interfaces, but still completely lacks error checking and handling.
I will implement this in the upcoming beta version.
Therefore I ask you to use the UDF only for testing purposes but not in productive code!
Many thanks to @Nine and @Danyfirex.
You helped me very well in solving some tricky problems.
My programming knowledge is very basic.
I have an old script that creates shares and assign permissions. It normally registers SetAcl.ocx if necessary and creates an object to assign permissions.
The command that registers SetAcl was apparently working fine under Windows 7 but is not working under Windows 10.
RunWait("regsvr32.exe path\to\setacl.ocx /s", "", @SW_HIDE) As I'm logged in as admin, I changed this command to :
RunAsWait(@UserName, "", "", 0, "regsvr32.exe path\to\setacl.ocx /s", "", @SW_HIDE) It seems to terminate correctly but the script still doesn't work as expected.
To check that, I've created that small script :
Local $objSetAcl = ObjCreate("SETACL.SetACLCtrl.1") If IsObj($objSetAcl) Then ConsoleWrite("Object successfully created." & @CRLF) Else ConsoleWrite("Object not created. Registering SetAcl.ocx" & @CRLF) Local $result = RunAsWait(@UserName, "", "", 0, "regsvr32.exe path\to\setacl.ocx /s", "", @SW_HIDE); Use of my admin username to elevate CMD ConsoleWrite("Return code : " & $result & @CRLF) ConsoleWrite("Creating object" & @CRLF) $objSetAcl = ObjCreate("SETACL.SetACLCtrl.1") If IsObj($objSetAcl) Then ConsoleWrite("Object successfully created." & @CRLF) Else ConsoleWrite("Object creation failed." & @CRLF) EndIf EndIf It tries to register SetAcl.ocx, return code 0 seems to be fine but still can't use SetAcl.
But if I go to CMD as admin, run the regsvr32 command and restart my script, it can create the object without issue.
I know my poor knowledge makes me miss something. Anyone can help me figure this out ?
Dear members of the forum,
I'm working on a project in which I have to use Image recognition technique.
Due to client restrictions, I couldn't use AutoIt for this project.
Is there a way to use this DLL "ImageSearchDLL.dll" (which is used to do image recognition steps in AutoIt) in VB.Net to achieve the same result?
I have used this DLL few years before and got good results. If there is a latest version of this DLL and if you can share it, that will be helpful too.
Any guidance is deeply appreciated.