Jump to content

setting A3X to run like EXE ??


Recommended Posts

G'day All

As A3X files arn't (as far as I know) deleted by Antivirus programs I was thinking of compiling all of my scripts as A3X and avoid the constant issue of making exceptions in the Antivirus software or getting my programs deleted.

Now I don't want to install the FULL AutoIt install on every computer I encounter so I was thinking a nice small installer that does the following.

  • Checks if .A3X regisitry key exists - If it is then exit

  • if X86 or X64 then Copy Autoit3.exe to @ProgramFilesDir & "\autoit"

  • If X64 then Copy Autoit3_X64.exe to @ProgramFilesDir & "\autoit"

  • Add .A3X to the registry
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.a3x]
@="AutoIt3XScript"

[HKEY_CLASSES_ROOT\AutoIt3XScript]
@="AutoIt v3 Encoded Script"

[HKEY_CLASSES_ROOT\AutoIt3XScript\DefaultIcon]
@="C:\\Program Files (x86)\\AutoIt3\\Icons\\au3script_v10.ico"

[HKEY_CLASSES_ROOT\AutoIt3XScript\Shell]
@="Run"

[HKEY_CLASSES_ROOT\AutoIt3XScript\Shell\Run]
@="Run Script"

[HKEY_CLASSES_ROOT\AutoIt3XScript\Shell\Run\Command]
@="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe\" \"%1\" %*"

As far as I can see that is all that would be required. Well maybe a version check and error checking of course. :)

Sooo has anyone already done this? If so can you post your solution?

Is there such a thing as an X64 ".A3X" file? Does AutoIt.exe handle this?

Are there any flaws in this idea?

Thanks for your feedback!

John Morrison

Link to comment
Share on other sites

Search the Forum/help file for the following..._RunAu3/_RunWaitAu3 (my snippet), look in SciTE Jump for Monitor.a3x and /AutoIt3ExecuteScript in the help file.

You don't need to install AutoIt, if you compile an AutoIt executable then just use _RunAu3 to run the a3x script. A word of warning, if you compile as a 32-bit process, then the a3x will be run as a 32-bit process due to the calling process being 32-bit. I use Monitor.a3x in SciTE Jump to create a new process of monitoring SciTE, thus SciTE Jump doesn't hang when constantly checking SciTE every 500ms.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hi guinness

You didn't get my meaning!

I don't want to run run an .A3X from a .EXE AutoIt program, that's easy (And very useful).

Anyway the parent AutoIt program could be deleted by an AntiVirus program.

The whole point is I'm trying to avoid false positives killing my programs!

Simply put I want to "CLICK"/"Run from a Batch file"/etc an .A3X file as if it was an .EXE.

The registry items above show exactly how a standard AutoIt install does it now.

It's fairly trivial to write an "installer" to do this in AutoIt I just want to see if anyone else has already done it (In a better way).

Thanks for the feedback!

John Morrison

Link to comment
Share on other sites

You should have been clear that you knew about this already, I didn't think you did.

I think you're trying to solve a problem which doesn't really exist on such a large scale. Many users download my AutoIt based applications and I yet to have a single person come back to me stating "my anti-virus flagged your application". Seriously!

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Developers

@storme,

I think your question is clear and I have done something similar many years ago.

My main goal was to limit the bandwidth required of rolling out new scripts to many pc's on remote locations.

I think all I did was copy the version of AutoIt3,exe I wanted to work with and created an association for a3x to use the program stored in a fixed location.

There is no x86/x64 a3x version so you can run it with either version as you wish.

Jos

Edited by 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.
  :)

Link to comment
Share on other sites

@storme,

I think your question is clear and I have done something similar many years ago.

My main goal was to limit the bandwidth required of rolling out new scripts to many pc's on remote locations.

I think all I did was copy the version of AutoIt3,exe I wanted to work with and created an association for a3x to use the program stored in a fixed location.

There is no x86/x64 a3x version so you can run it with either version as you wish.

Jos

Thanks Mate!

I seem to remember back a way on the forum someone did this but I searched back and couldn't find anything.

Well I may just bite the bullet and write the thing. I've been forced to do this as several of my scripts have gone missing (virus scans on customer computers) and I'm sick of adding exceptions (usually after the files have been deleted).

I figure run this thing before I run anything else and I'm clear to use a3x, exe, bat, etc :) and I can forget about the AntiVirus programs. :)

Onward an upward!

John Morrison

Link to comment
Share on other sites

I think I may have something that may suit the task well. Perhaps better then a cmd file. A small edit to make it a A3X rather then a exe but it works the same anyhow. This is a script to act as a frontend to AutoIt and related tools.

Compile the au3 to a3x

Put the a3x file in the same directory as autoit3.exe

Drag it on to autoit3.exe

A window will show register and unregister. select register. keys are added to HKCU\Software\Classes to set association.

The association will run autoit to run the a3x file to start a menu of options for run, compile etc.

This should work for basic/zip uses for autoit as well as installed.

Everybody likes a picture. This is from rightclick run action. An edit box is there to start your a3x file with parameters if you want.

I just added the association for a3x and it seems like it may work ok.

For au3 you will have open, check, compile, edit, run and runas. For a3x you will have open and run. It is missing runas for a3x but I can add that.

Do not forget to unregister off someone elses PC.

Edit: updated Au3Menu.zip with runas for a3x and fix for runas when menu is a a3x file

Edited by MHz
Link to comment
Share on other sites

Thanks MHz I'll have a look.

It maybe more than I need for this one but it sounds like it has all the aspects I need and a few I hadn't thought of. :)

Storm-E

Link to comment
Share on other sites

You should have been clear that you knew about this already, I didn't think you did.

I think you're trying to solve a problem which doesn't really exist on such a large scale. Many users download my AutoIt based applications and I yet to have a single person come back to me stating "my anti-virus flagged your application". Seriously!

I'm glad you have had a better run that I have!!

I've got 3 script missing (this week) from my memory stick that were removed by different antivirus.

One of the 3 has been unchanged for 12 months and only just got deleted, I didn't even know it was missing as it's automated task is a background one. Luckily I was doing some checks and discovered that it had gone AWOL . :( Now I have to find the source and recompile.

Another of the 3 regularly gets stomped by antivirus programs (no UPX, it just accesses a web site clicks a few boxes and downloads a program from the same web site).

So for me it's a serious problem! Also if the customer changes their antivirus the exceptions I set up are lost the scripts get stomped. So I can't guarantee any of my AutoIt scripts to customers. :(

The semi regular "is AutoIt a virus" posts makes me think others are also having similar problems. :(

I wonder is it the content of your scripts, what they do or don't do or something you do when you compile them. It'd be interesting to find out.

John Morrison

Link to comment
Share on other sites

I wonder is it the content of your scripts, what they do or don't do or something you do when you compile them. It'd be interesting to find out.

I have my methods in that I probably do what 90% of most AutoIt users do and my applications are public knowledge, you can easily find them by searching. Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I have my methods in that I probably do what 90% of most AutoIt users do and my applications are public knowledge, you can easily find them by searching.

Yep seen your stuff all over. In fact I probably have your snippets, functions, parts of your code or stuff inspired from your code in my scripts. :)

Maybe you are lucky or I'm just unlucky as there isn't anything "tricky" in mine either. :(

Link to comment
Share on other sites

  • 5 months later...

firsttimer,

The attachment no longer exists as it has become obsolete. A topic exists in Examples Forum in which you can download a updated version >here.

When you see similar to a "[attachment=***]" literal reference, then the attachment has probably been removed and thus the hyperlink has been replaced with the literal form of the reference.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...