Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Decompile (Exe2Ahk) option in Explorer context menu


  • Please log in to reply
12 replies to this topic
Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
Here's a registry key that allows you to decompile an .exe with Exe2Ahk via the Explorer context menu. The key installs at HKEY_CLASSES_ROOT\exefile so it will only show in the menu for .exe files. You will need to download Exe2Ahk and modify the path to the executable in order for this to work.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\exefile\shell\decompile]
@="Decompile (Exe2Ahk)"

[HKEY_CLASSES_ROOT\exefile\shell\decompile\command]
@="\"x:\\AutoHotkey\\Exe2Ahk.exe\" \"%1\""

"Anything worth doing is worth doing slowly." - Mae West
Posted Image

BluEyedCollegeGuy
  • Guests
  • Last active:
  • Joined: --
Thank you very much for the code bit. It works beautifully.

You might want to tell people that the registry key you created will only work on Windows XP or 2000. If they take your code snippet, save it as a .reg file then double click it, the registry is automatically updated. (Change the filepath from x to whatever first).

If you want this code to work on Windows NT, you need to change the code "Windows Registry Editor Version 5.00" to "REGEDIT4".

AHKnow*
  • Guests
  • Last active:
  • Joined: --
This is great.

Should be considered as a possible option in the official AutoHotkey package.

  • Guests
  • Last active:
  • Joined: --
I passworded my AHK file is there a way to add a password to this?

DHMH
  • Guests
  • Last active:
  • Joined: --
Yes! (my english isn´t good, so don´t worry about it! :D )
Just create a registry file with this content:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\exefile\shell\decompile]
@="Decompile (Exe2Ahk)"

[HKEY_CLASSES_ROOT\exefile\shell\decompile\command]
@="\"c:\\Program Files\\AutoHotkey\\Exe2Ahk_gui.exe\" \"%1\""

Import it.
Now create another new file (an ahk script!!!) with this content:
InputBox, password, Enter Password, (Leave this field blank if you don´t set a password), hide 
runwait, "%A_ScriptDir%\exe2ahk.exe", %1% %password%
ExitApp
Compile it and rename it to exe2ahk_gui.exe!
Now you can choose from the context menu of an exe file "Decompile (Exe2Ahk)! :D [/quote]

guest123
  • Guests
  • Last active:
  • Joined: --
I receive a windoze "access is denied" error every time I try to use this decompile tool, even on non password protected .exes created by myself?

I really need to get this to work, a guy who used to work for our company created a very useful AHK macro with a GUI over several weeks, now we need to make minor alterations to it and we can't turn it into an AHK!

Say if I cant get this to work I really will need some help making a new macro tool to copy and paste lists of names and dates of birth! It was just copy and paste - tab to next field and repeat, but I have never used AHK until two days ago!

At least the "steal GUI" tool worked for me, now I just have to assign commands to buttons...somehow. Unless I can get decompile to work.


Sorry for going off topic....help?

Mr.Wolna@German AHK Board
  • Guests
  • Last active:
  • Joined: --
Works perfect for my, thank you!

Yook
  • Members
  • 76 posts
  • Last active: Sep 23 2011 01:49 PM
  • Joined: 20 Nov 2008
Hi.
I would add that if you get the "Access is denied" stuff, this is because the Exe2Ahk.exe file is not in the folder you say it is in the registry.
The cleanest way, I think, is simply to place this file in AutoHotkey folder. If this folder is itself placed in Program Files, you can use this code in the .reg file :
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\exefile\shell\decompile]
@="Decompile (Exe2Ahk)"

[HKEY_CLASSES_ROOT\exefile\shell\decompile\command]
@="\"\%ProgramFiles\%\\AutoHotkey\\Exe2Ahk.exe\" \"%1\""
(My Program Files folder is not on C: drive.)

AJAcker
  • Guests
  • Last active:
  • Joined: --
The easy way without reg editing to decompile is:

Run CMD
drag the exe2ahk.exe to the command box to complete the path
hit space bar
drag the exe you wish to decompile to the command box to complete the path
(space then password if one was set)
hit enter.

This creates an .ahk file in the same directoy as the .exe

Hope that helps. (and is right!!)

  • Guests
  • Last active:
  • Joined: --
the draging into cmd doest work for me, im trying to decompile a file i found on the internet, its not password protected

  • Guests
  • Last active:
  • Joined: --
I have tweaked it all and this works fully and better:
1. Download this and save it to C:\Program Files\AutoHotKey\exe2ahk.exe
2. Copy this code into notepad:
Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\exefile\shell\decompile] 
@="Decompile (Exe2Ahk)" 
[HKEY_CLASSES_ROOT\exefile\shell\decompile\command] 
@="\"c:\\Program Files\\AutoHotkey\\Exe2Ahk_gui.exe\" \"%1\""
Save it as "reg.reg" to your desktop
3. Run reg.reg from your desktop then delete it
4. Copy this code into notepad:
InputBox, password, Enter Password, (Leave this field blank if you didn't set a password), hide 
runwait, "%A_ScriptDir%\exe2ahk.exe" "%1%" "%password%" 
ExitApp
Save it as "c:\program files\autohotkey\Exe2Ahk_gui.ahk"
5. Navigate to "C:\program files\autohotkey\"
6. Compile Exe2Ahk_gui.ahk to Exe2Ahk_gui.exe
7. Right click on a compiled .exe script and click decompile. This will decompile it back to an .ahk script

SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

This is very handy tnx! :D


  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

PMForkin
  • Members
  • 21 posts
  • Last active: Feb 26 2014 10:10 AM
  • Joined: 11 Dec 2012

Hallo!

In an attempt to decompile a script that I had produced and compiled with an earlier version Of AutoHotKey I have installed both the Classic and Basic versions in directories separate from the current version and used the windows command line with a and attempted to use a command as follows <Exe2AHK, csv_again5_new.exe, CSVnewLV.ahk> but in both cases the response was that OpenExe was invalid.

Could you please offer me assistance to resolve the decompilation process?

Thank you and kind regards PMForkin.