Edit exe Files

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Edit exe Files

Post by nodochau » Tue Oct 27, 2020 12:06 pm

Hello All,
I have an exe file (compiled from my scripts) and I've lost the source code of that file (don't know why). So is there any way to edit the exe file?

Thanks

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1386
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Edit exe Files

Post by Dorian (MJT support) » Tue Oct 27, 2020 12:35 pm

Sorry to tell you there's no way of you doing that.
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Edit exe Files

Post by JRL » Tue Oct 27, 2020 3:12 pm

Your situation is exactly why I wrote THIS

nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Re: Edit exe Files

Post by nodochau » Wed Oct 28, 2020 7:21 pm

JRL wrote:
Tue Oct 27, 2020 3:12 pm
Your situation is exactly why I wrote THIS
Very interested JRL and I have a question regarding the app.
So if I use the app to compile my script then I can extract it after that. And if I compile my scrip by using the macro scheduler compiler can I still extract it by the app?

Thanks

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Edit exe Files

Post by JRL » Wed Oct 28, 2020 7:45 pm

...can I still extract it by the app?
The app does not retrieve your script. The app builds an executable that has the ability to retrieve your script. Macro Scheduler's compiler does not currently offer that ability.

I received a PM earlier today that informed me the link to the app is not working. I checked prior to posting on Oct 27 and I know it was working then so hopefully Miscrosoft is having a temporary issue. Otherwise I do not have an alternate internet location for posting executables.

nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Re: Edit exe Files

Post by nodochau » Thu Oct 29, 2020 11:22 am

Just download it. I will try it out
So is the app able to compile anything such as C++, python? :wink:

nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Re: Edit exe Files

Post by nodochau » Thu Oct 29, 2020 1:03 pm

JRL wrote:
Wed Oct 28, 2020 7:45 pm
...can I still extract it by the app?
The app does not retrieve your script. The app builds an executable that has the ability to retrieve your script. Macro Scheduler's compiler does not currently offer that ability.

I received a PM earlier today that informed me the link to the app is not working. I checked prior to posting on Oct 27 and I know it was working then so hopefully Miscrosoft is having a temporary issue. Otherwise I do not have an alternate internet location for posting executables.
Hi JRL,
I successfully created a exe file by using thee app but I am still confused how to use it to extract codes from the exe file. Please show me more details how to use the app for extracting...
Thanks a lot

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Edit exe Files

Post by Marcus Tettmar » Thu Oct 29, 2020 3:53 pm

You cannot extract source code from .exe files created in the usual way.

I think JRL's solution gives you a way to 'compile' exe files AND store the source code inside the exe so that it can be extracted. It will ONLY help you extract the source code IF the exe was already created this way. If the exe was created by Macro Scheduler in the usual way you would not be able to extract the source code.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Edit exe Files

Post by JRL » Thu Oct 29, 2020 4:34 pm

I don't know how to explain it better than in the original post

"The app does not retrieve your script". The executable where you have lost the original script, the original script is irretrievable. Unless you find a backup copy or rewrite it from memory or have printout of it on paper it is lost forever. Having been in this situation, I was inspired to write this program

The program I wrote gives you the ability to create new executables where the original script is extractable by adding the "/extract=password" parameter onto your new executable. If you run your new executable without the "/extract" parameter your executable will perform whatever task you wrote it to perform. If you run your new executable with "/extract=password" as a parameter, the script will write your original script to an SCP file in the same folder as your new executable.

nodochau
Pro Scripter
Posts: 135
Joined: Wed Jan 16, 2019 12:59 pm

Re: Edit exe Files

Post by nodochau » Thu Oct 29, 2020 5:34 pm

Hi JRL,
Here is your original post
----------- To extract the script from the executable:

1) Run the executable from a command line using the command line parameter /extract=password (or /extract= if you intensionally left off the password at compile).

Me:Run the exe file which is compiled by the app under command line /extract=password? Or run the app?

2) One easy way to do this is by RIGHT clicking the executable and dragging it. When you drop it a menu will pop up from which you pick "Create shortcut here". Open the properties of the shortcut by RIGHT clicking the shortcut and selecting "Properties" from the menu.

Me: Right click on the exe file that is compiled by the app?? and dragging it and drop it to where?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Edit exe Files

Post by JRL » Thu Oct 29, 2020 6:29 pm

----------- To extract the script from the executable:

1) Run the executable from a command line using the command line parameter /extract=password (or /extract= if you intentionally left off the password at compile).

Me: Run the exe file which is compiled by the app under command line /extract=password? Or run the app?

JRL: Run the exe file which is compiled by the app.



2) One easy way to do this is by RIGHT clicking the executable and dragging it. When you drop it a menu will pop up from which you pick "Create shortcut here". Open the properties of the shortcut by RIGHT clicking the shortcut and selecting "Properties" from the menu.

Me: Right click on the exe file that is compiled by the app?? and dragging it and drop it to where?

JRL: You're creating a shortcut to your compiled executable. It does not matter where you drop it. For convenience I usually drop mine in the same folder as the executable so I don't have to go looking for it. Also, I'll usually delete the shortcut after extracting the script. Otherwise I'm leaving the password lying around.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts