Jump to content

Please Help - Compressing an EXE along with output AutoItEXE.


Go to solution Solved by mohan93,

Recommended Posts

Hi Guys,

Am new to AutoIt Scripting. I have a requirement.

Am using an exe in my script which is placed in my current folder, eg: abc.exe
my sample script:

#RequireAdmin
run (".abc.exe")
sleep(2000)
MsgBox(1, "Sample", "It Works")

When i complie the script, i get an output EXE. But it works with the abc.exe in the current folder, when i run my output EXE alone it is searching for abc.exe

I want to complie the above mentioned script, and my final AutoIT generated exe have to compress my abc.exe within final exe and should work placing it anywere without the current folder EXE.

Please help.

Thanks in Advance.

Cheers,

Mohan

Edited by mohan93
Link to comment
Share on other sites

  • Moderators

mohan93,

Welcome to the AutoIt forum. :)

Look at FileInstall in the Help file - that will do what you want. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

What you are asking is not terribly clear.

I would have just replied with - Run(@ScriptDir & "abc.exe")

But perhaps Melba23 has the right of it?

The Help file is your friend though, and should be first port of call.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Thanks for replying.

I tried FileInstall function,

FileInstall ( "source", "dest"), Seems this one is used in the case when we want to copy a file from one location to another.

In my case, i dont want to copy abc.exe to anywere on the machine.

Is that possible to hold it inside the Final EXE itself and run.

Regards,

Mohan
 

Link to comment
Share on other sites

  • Moderators

mohan,

Yes, it can be done - but it is not very simple and likely to trigger all sorts of HIPS alarms (it certainly does on my machine). But at your stage of AutoIt learning I would suggest you stick with FileInstall - just copy the abc.exe file to the folder in which you have your exe and then delete it when you have run it. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...