ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post your working scripts, libraries and tools for AHK v1.1 and older
TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 28 Mar 2023, 19:21

Update - 29 Mar 2023
/ScriptGuard2 file handling is now fully Unicode compatible.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

User avatar
JoeWinograd
Posts: 2166
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by JoeWinograd » 28 Mar 2023, 23:02

Hi TAC,
Excellent enhancement! Really appreciate your ongoing effort to improve ScriptGuard. Cheers, Joe

ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by ozzii » 29 Mar 2023, 05:22

Hi TAC,
same as JoeWinograd ;)

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 29 Mar 2023, 18:47

Thanks @ozzii! I’m glad you are finding ScriptGuard useful.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 30 Mar 2023, 23:51

@Peaceful
You can use UPX (or MPRESS) if you select an .exe as a Base file. The restriction only applies when a .bin is selected as a Base file.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 01 Apr 2023, 20:20

Update - 02 Apr 2023
/ScriptGuard2 now has aligned mcode for faster processing.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

User avatar
JoeWinograd
Posts: 2166
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by JoeWinograd » 02 Apr 2023, 03:03

A tip for my fellow forum members. When I saw announcements like these from TAC109, I had been updating BinMod (to get ScriptGuard2) by downloading from GitHub and manually copying it to the AHK installation folder. But then TAC109 explained that it can be done much more easily via the GUI compiler, i.e., simply click Help>Check for Updates... and you'll get this:

Ahk2Exe help-check for updates.png
Ahk2Exe help-check for updates.png (10.44 KiB) Viewed 1539 times

Tick whatever is not Up-to-date and click the Update? button, as I just did for BinMod 2023-04-02...easy peasy! As you can see in the dialog, it also works great for the compiler itself, as well as MPRESS and UPX. Thanks again to TAC109 for that tip, and for today's speed improvement to ScriptGuard2. Cheers, Joe

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 02 Apr 2023, 04:43

@JoeWinograd
Thanks for the helpful advice to users. :thumbup:

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 30 May 2023, 22:18

Update - 31 May 2023
Add new parameter /ScriptGuard2pss ('Permit /script switch').
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 04 Jun 2023, 18:04

Update - 05 June 2023
Fix error message.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

red12sin
Posts: 1
Joined: 15 Aug 2023, 00:59

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by red12sin » 15 Aug 2023, 01:09

Thank you for sharing your knowledge.
During compilation, the following error message occurs and the process does not proceed. Can you confirm what the problem is?

Error. Invalid directive: (D1)
Specifically:
%U_Bin% "1%U_au%2>AUTOHOTKEY.SCRIPT<.RANDOM"
"%U_au%AutoHotkeyGUI.RANDOM" /ScriptGuard2

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 15 Aug 2023, 04:31

@red12sin Can you check that you have copied and pasted the compiler directives correctly into your script.
If you past them here from your script I can double-check them as well.

Edit: It looks like the two ;@Ahk2Exe-Obey compiler directives further up weren’t executed properly. Could you check these as well.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

kaka2
Posts: 2
Joined: 30 Nov 2023, 06:44

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by kaka2 » 30 Nov 2023, 06:48

TAC109 wrote:
05 Feb 2023, 17:03
1. If you select an .exe as a base file, the resulting compiled program can be compressed and run successfully. (See the second restriction near the end of the first post.)
Hi All, I am new here.
@TAC109
How can i select base file. i could not understand. can you please elaborate?

kaka2
Posts: 2
Joined: 30 Nov 2023, 06:44

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by kaka2 » 30 Nov 2023, 07:42

Oops... My mistake, :oops: Got it now. ;) I just need to select Ahk2Exe.exe from Base file option in the compiler. :dance:

TAC109
Posts: 1096
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

Post by TAC109 » 30 Nov 2023, 16:19

@kaka2
If you want to compress the compiled program, you can select any appropriate .exe file as the base file; in other words, if a v1 .bin base file is selected it won’t run if compressed.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

Post Reply

Return to “Scripts and Functions (v1)”