I still plan to continue developing this tool for a while, since I like it
Thanks to the following users whose works and/or help were crucial to making this script fully portable:
- boiler
- teadrinker
- Rapte_Of_Suzaku
- lexikos
- DaveT1 - for having a keen eye for what I messed up
AHK Portable Installer
- ahk-pi-main.png (22.24 KiB) Viewed 11603 times
Updates
v1.29
v1.29
- now checking 'tag_name' in github output instead of 'name' for version info
- when changing from UPX platform from/to win32 <-> win64, and then clicking "Check for Updates", the proper platform will be downloaded.
- changed default UPX platform to win64
- added an update check after switching the UPX platform for download, in order to update the URL when the download happens
- fixed execution of #Requires directive to filter by major version, as is done by AHK
- fixed execution of "match" option
- updated readme
- improved sorting of main list
- improved execution of #Requires directive
- added "match" option for #Requires
- updated readme
- added a check for UserChoice reg key, prompts user to optionally remove it
- minor readme update to clarify a few things about disabling UserAccountControl
- MPRESS and UPX are now automatically downloaded if they doesn't exist, and is automatically extracted to the Compiler folder
- Cleaned up some code, removed unused bits
- Reorganized some settings
- Updated readme
- Note that MPRESS, Ahk2Exe, and UPX are only implemented when the user selects to download a version of AHK.
- fixed selected file downloaded never being downloaded (thanks to @FrankNFurter)
- Ahk2Exe is now automatically downloaded, and extracted to install dir if no "Compiler" folder exists.
MPRESS and UPX are currently not included for automatic downloads.
Thanks to lexikos' release of AHK v2-beta.4, I got the idea of a short and direct way to check for Ahk2Exe updates from his code/release.
- Built option to register "AutoHotkey.exe" with .ahk files, instead of using the launcher.
- Fixed "Run Script as Admin" to follow settings for PATH and "Register AutoHotkey.exe".
- Updated readme to include explanation of Installer Options and updated Command Line Usage docs.
- NOTE: This update adds an option to turn this program in to an "EXE switcher" similar to "AHK-EXE-Swapper". This overrides the Launcher and only uses the installed version to launch scripts. You can still use the UI to quickly and easily change the installed version of AutoHotkey.
Another NOTE: Switching while a script is running will fail, so don't do it. If you need to run multiple different scripts of different AHK version simultaneously, then don't use this feature. Instead use the #Requires directive. See the GitHub repo README for more info.
- Added missing setting on 1st init: "UpdateCheckDate"
- Fixed update checks to be asynchronous, so the UI won't freeze when checking for updates and the AHK server is sluggish or down.
- Now, when using the installer, changing the installed version takes effect immediately. No need to close the UI first.
- Built option to add "AHK Portable Installer" path to PATH environment variable. The "Install For" option affects adding to the user PATH or system PATH.
- Built option to copy installed EXE to "AHK Portable Installer" dir as "AutoHotkey.exe".
- Renamed script to "AHK_Portable_Installer.ahk" (removed spaces) to make command line usage more consistent.
- Updated readme for command line usage instructions.
- Removed some redundant code.
- Improved handling of settings.json - there is no more `settings.json.blank` - the script will create the file with all default settings.
- Improved handling of errors and related error messages.
- Added a "ReadOnly" mode for when being invoked by command line/registry. Now settings are only written to disk when closing the GUI.
- Fixed listing of AHK_H EXEs (was temp broken).
- Removed lots of comment code.
- Updated docs.
- fixed always untrue IF statement in SetActiveVersionGui()
- fixed empty error msg when checking for updates on script startup when no updates are available
- better handling of matched file not found vs specified requirement not matched
- added better recognition for AHK v1.0 binaries
- AHK Launcher has been replaced by usage of the #REQUIRES directive (thanks to @vvhitevvizard and @lexikos for inspiration).
- Downloading is now possible through the UI.
- The default Base Folder is now the script directory.
- Uses #Requires directive to select exe for script launch, no more AHK Launcher.
- Installs to HKCU by default. Can be changed to HKLM in Settings > Basics tab.
- Minor bug fixes, and small adjustments.
- Reworked some code to be less redundant.
- Activate EXE button has been changed to Install Or Select, depending on if Fully Portable mode is enabled.
- When the program is running, any files that do not have the .ahk extension will be ignored when using MButton hotkeys.
- This script is now aware of User Account Control (UAC) settings. If UAC is enabled on your system, then use "Run as Administrator" to be able to install the .ahk file type extension. If this is not an option, then use Fully Portable mode.
- To elevate a script automatically on launch, specify line 2 in your script as ; admin. UI Access is not currently implemented.
- A few minor bug fixes.
- Updated the docs on GitHub
- EXE file version info now taken directly from the EXE in most cases. AHK_H still requires the original folder structure to differentiate between "MT" and "standard" versions. Directory layout is generally the same, but the naming convention is now much less strict.
- When choosing your base version, a copy of the EXE renamed to "AutoHotkey.exe" is no longer done automatically. This is in line with how AHK v2 a136+ will be compiled (this feature may come back - depending on how Ahk2Exe developments go).
- For the latest test build of Ahk2Exe that conforms to the latest features/requirements of AHK v2 a136+ go here.
For notes on this test release of Ahk2Exe, see this post.
- Added "#SingleInstance Off" which prevents the script from prompting the user to close for another instance when in non-portable mode.
- Now settings are not re-saved/written to disk every time the launcher runs a script or opens the compiler in non-portable mode.
- Added a reminder, when running in non-portable mode, in the Regex edit sub-window (in AHK Launcher tab) to close the script for new settings to take effect.
- Added conditions to prevent some overlooked registry checks/modifications when in portable mode.
- these checks should only happen in non-portable mode
- Added hotkey CTRL + MButton for compiling scripts.
- Removed "Ahk2Exe_Handler.ahk" and "AhkLauncher.ahk". The functions in these files are now in the main script file.
- Updated registry entries to point to the main script EXE (when not in portable mode).
- "AHK Launcher" and "Ahk2Exe Handler" now function in Fully Portable Mode.
- Significantly cleaned up the README.
- Updated tooltips with more helpful messages.
- Cleaned up old commented code.
- Added "Compiler" button to access the compiler.
- Added options to pick an icon, and included a few colors to choose from.
- Added option to show/hide tray icon.
- Added option to close to tray.
- Added option to minimize on startup.
- Added option to Run on system startup.
- Added MButton hotkey to run script files on desktop and in file browser windows.
- Added SHIFT + MButton hotkey to open script files in specified text editor.
- added credits for Explorer_GetSelected().
- Updated README.
- updated for AHK v2 a131
- now, when modifying a match string in "AHK Launcher" tab, the selected entry is simply updated, instead of refreshing the entire list.
- Updated README
- Script now can be run uncompiled.
- You must use AHK v2 binaries to run the script if running uncompiled.
- Rewrote registry handling to be as fast as it was in v1.8
- Reorganized some GUI controls and labeled some things better.
- Updated docs.
- Updated OP with a more concise list of features.
- RegEx matches in EXE list (Extras Tab) are now case insensitive.
- Added checkboxes for toggling the showing of context menu elements
- Improved registry interaction, should properly function when "Run as Administrator" is selected.
- If window was moved out of bounds of the "active monitor", now the previous coordinates will be overwritten to ensure the window is properly displayed in-bounds on the current monitor. This is most necessary when working on a multi-monitor setup, and then switching to a single monitor.
- Scaled back "Ahk2Exe Handler". AutoHotkey_H v1 compiler behaves significantly different than expected and doesn't seem to integrate as well with the context menu. Currently using the "Ahk2Exe Handler" will simply open Ahk2Exe and auto-fill the script to be compiled.
- AutoHotkey_H and compiler fully supported now
- no more need to rename .bin files, or AHK_H EXE files
- AHK Launcher updated to allow unlimited parallel version of AutoHotkey in Extras tab
- user specifies AHK version, first-line match string, and associated EXE to run on match in Extras tab
- appending AHK version to the end of the script file no longer supported - included .ahk templates changed to include AHK v1 and v2 lines, all commented out
- user can still define different custom templates for v1 and v2 if desired - fixed several small bugs on startup and when an invalid EXE is specified to run a script
- improved code to uninstall AHK registry entries, external .reg file no longer needed
- main EXE now only compiled as 32-bit, writes to 64-bit registry on 64-bit systems
- Added my own version of the WTFPL license. I just want to prevent some troll from attempting to being a turd of a human.
- changed storage to JSON, added library file for JSON
- removed XML library file, XML code is commented out
- FIXED: can't set base folder when running on system with locale NOT set to English due to error
- added registry checks on startup, which is useful when:
- running separate instances of this program on the same PC (not sure why you would)
- reinstalling AHK after a fresh install of Windows
- fixed script workingDir when using AHK Launcher
- added: remember GUI position on exit
- added: adjust GUI position if expanding below screen border
- added: Auto Start and Auto Open for compiler using fancy AHK Handler
- fixed: handling of removing registry entries when switching active/installed AHK exe
- minor update v1.45:
- fixed minor GUI misalignment
- added option to disable tooltips
- added simple ahk version designation as first-line version comment
GitHub Links
>> Download
>> README
>> Source
>> Change Log / Commit History
Other Solutions
Old AHK v2 Switchers and threads
If my solution doesn't work please let me know, but also try these out below:
Other Solutions
by EVIL-C
AHK EXE Swapper
GitHub: https://github.com/ahkscript/AHK-EXE-Swapper
by boiler
Run AltAHK Version (RAAV)
AHK v1: viewtopic.php?f=6&t=76602
AHK v2: viewtopic.php?f=83&t=76603
Here are 2 forum posts that discuss switching versions of AHK or running multiple versions of AHK on the same system:
viewtopic.php?f=37&t=63119&p=338767&hilit=Portable#p338767
viewtopic.php?f=82&t=75824&p=333505&hilit=Portable#p333505
Other Solutions
by EVIL-C
AHK EXE Swapper
GitHub: https://github.com/ahkscript/AHK-EXE-Swapper
by boiler
Run AltAHK Version (RAAV)
AHK v1: viewtopic.php?f=6&t=76602
AHK v2: viewtopic.php?f=83&t=76603
Here are 2 forum posts that discuss switching versions of AHK or running multiple versions of AHK on the same system:
viewtopic.php?f=37&t=63119&p=338767&hilit=Portable#p338767
viewtopic.php?f=82&t=75824&p=333505&hilit=Portable#p333505