Jump to content
pytruong

Script in Script to Compile to Exe

Recommended Posts

pytruong

Googled and Searched and I couldn't find this. I think my "keywords" are incorrect but I've tried different combinations of words. Closest thing I found was this: https://www.autoitscript.com/forum/topic/149432-build-exe-from-exe/ but I don't know if it's actually what I'm looking for and the link provided by Melba23 (https://www.autoitscript.com/forum/topic/149432-build-exe-from-exe/?do=findComment&comment=1064672) is giving an error.

What I'm trying to do is create a code("Code1") that contains another code ("Code2").

Code1 contains GUI input boxes for $Username & $Password

Code2 then uses those variables for the main coding that I've created

Code1 then creates the compiled Exe. 

But I would like Code1 to be in itself already an Exe that I can give to my colleagues.

The purpose is that Code1.Exe will request their credentials and then a new Exe will be compiled for them that ONLY contains Code2 (with their credentials embedded into it).

Share this post


Link to post
Share on other sites
argumentum

about a better approach ? 
https://www.autoitscript.com/forum/topic/155051-save-data-to-exe-itself-no-need-for-ini-files/#comment-1120251
the data in that topic is written without any protection but you can encrypt it and adapt the idea to your needs

Edited by argumentum
clarification

Share this post


Link to post
Share on other sites
pytruong

Thank you Argumentum for the quick response. Not exactly what I was looking for, because I didn't want to have 2 .Exe files but if what I originally wanted is not doable, I'll have to play with the scripts from that link. Thanks once again!

Share this post


Link to post
Share on other sites
Melba23

pytruong,

Unfortunately many of my links were irretrievably destroyed in the forum upgrade - something to do with the way in which they were formatted. I think this is the thread to which I was linking:

The compile process has changed slightly since that was written (there is no longer any need for AutoItSC.bin), but the principle remains the same.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Jfish

Not sure if this is what you mean from your original post but this script creates an EXE that you can give to a user (script #2) to enter a username and password and is generated from script #1.  https://www.autoitscript.com/forum/topic/170225-create-self-extracting-encrypted-exe-files/

EDIT: I did not see Melba's link at first - his is no doubt a much better approach.

Edited by Jfish
updated response

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites
pytruong

I'm sorry for the delay. Just wanted to thank you guys for the quick response. Melba23, I'm going to give that WrapIt a shot, it looks interesting. Thanks!

Share this post


Link to post
Share on other sites
RTFC

@pytruong: you may also be interested in CodeCrypter (link in my signature below), which allows you to create exes from your Code 1 that will run only for specific individuals, in specific environments, or upon entering a valid password (that is not stored inside the script/exe).

Share this post


Link to post
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

×