Jump to content

Installer and x64 Defaults


Jon
 Share

Recommended Posts

  • Administrators

I'm thinking that I've got the installer wrong for x64. At the moment during installation it detects if you are running x64 and if so offers you the choice of using x64 tools where possible (default). This means that by default all scripts are run with AutoIt3_x64.exe. That works most of the time but there are some oddities with COM objects and RegRead/Write (x64 registry works in a slightly different way that can cause issues if the script is not coded in the correct way).

I'm thinking that maybe I should remove the choice and just have 32bit as the default and add shortcuts/context menu items for x64 options.

Link to comment
Share on other sites

  • Administrators

Maybe the same/similar approach as with "Extras\Toggle AU3 Beta.au3" can be used for this.

So add something like "Extras\Toggle AU3 x64.au3"

Maybe. But maybe overengineering. Apart from its greater speed and interacting with other 64bit processes there's not much reason to use the x64 version. So as long as there is an "Run Script (x64)" content menu option that would probably suit most.
Link to comment
Share on other sites

  • Developers

AutoIt3Wrapper currently has this approach for RUN:

If @OSArch = "X86" Or StringInStr(RegRead("HKCR\AutoIt3Script\Shell\Run\Command", ""), "AutoIt3.exe") Then
    SetDefaults($INP_UseX64, "n", "auto=a;yes=y;no=n;1=y;0=n;4=n", "y;n", 0, 0)
Else
    SetDefaults($INP_UseX64, "y", "auto=a;yes=y;no=n;1=y;0=n;4=n", "y;n", 0, 0)
EndIf

So that means it will default to the same as specified by the AutoIt3 installer or else, when the regkey doesn't exists, use X64 for x64-OS set-ups.

Either way works for me but we should follow the same approach.

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

  • Administrators

Think that would still be OK. x86 would be the default so that snippet would be running AutoIt3.exe which is what I want (I've actually been caught out by scite running x64 by default on my system but it's doing the "right" thing according to the choices I made during installation).

Edited by Jon
Typos
Link to comment
Share on other sites

I like the idea of having a script run in the native bit mode of the environment as a default, which is how I have it currently set up. Double-clicking launches autoit_x64 on my system. Never did like the idea of double-clicking resulting in Scite opening, which winds up clearing the last session data.. but hey, thats me.

Link to comment
Share on other sites

  • Administrators

That was pretty much why I did it the way I did. But as it causes bug reports because of some COM object not working or some script not knowing about HKLM\Software and WoW32Node it causes me to reconsider.

See #1937 for what I mean.

Link to comment
Share on other sites

I can see your point, but people who program could at least try to know something about bit-mode differences. Plus, if you change it, there will be 64-bit components they will be complaining about a 32-bit script not running correctly with a 64-bit program. With the ticket given, for example - there is a 64-bit version of Office running on my system, not a 32-bit one. The programmer will then be asking 'why doesn't my script communicate with Office com objects'... And that will probably be the case as more and more programs are released as 64-bit.

Perhaps where it says 'You are running a 64-bit Operating System. Use native x64 tools were possible?' while install, you could provide more information about bit-mode incompatibilities, or default to 'No'. Or even put something on the bug report page..

Link to comment
Share on other sites

I would like to see the current installer stay the same, ie keep using 64-bit tools by default on 64-bit systems. If nothing else, it will force some people to learn about the OS they're trying to leverage.

In regard to the registry functions... I would like to see AutoIt have support for 64-bit scripts to access the 32-bit registry with a HKLM32 type construct. Currently this is not possible without hardcoding the Wow6432Node subkeys.

Edited by wraithdu
Link to comment
Share on other sites

  • Administrators

I'm pretty sure the error even mentions something about architectures too, right?

If you try and run a x64 exe on x86 then yes, the error helps you out. It's running x64 on x64 where the silent errors occur (regreads failing, etc).

The factors that I see at the moment are:

- Most new PCs are installed with x64 windows. Therefore Autoit will install with x64 defaults

- Most people won't be aware of the implications of Reg functions and COM objects.

- Most software we are automating (with the exception maybe of Explorer) are x86.

- x64 compiling for x64 by default is probably a bad idea for scripts that are going to be distributed

- People who want x64 are probably smart enough to select an "x64" option from the context menu or enable an x64 option for compiling.

On the other hand, from a geeky technical point of view I like the idea of running x64 tools on an x64 system (pretty much the whole reason we made the effort to recode AutoIt to work in native x64 if I'm honest)

Edited by Jon
Link to comment
Share on other sites

Made some changes:

- The standard x64 installer screen is still shown but the x86 option is now the default

- x86 and x64 shortcuts and context menu entries are created.

Thanks Silent Singer ... I mean Jon! I have just gotten so used to using #AutoIt3Wrapper_UseX64=N as I mostly code for x86! 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

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...