Jump to content
Sign in to follow this  
novi

Error! Running an exe from within the script exe. Help!

Recommended Posts

novi

Greetings!

How can I run a *. exe included in my executable?

I have done these things:

Note: I use the UDF # include "resources.au3" in my script.

# AutoIt3Wrapper_useupx = n

# AutoIt3Wrapper_run_after = ResHacker.exe-add% out%,% out%, listF.exe, RCDATA, TEST_BIN_1, 0

# Endregion

then I tried to use it like this:

RunWait (@ ComSpec & '/ c' & _ResourceGet (TEST_BIN_1 ") & 'kernel32.dll> yor.txt')

It does not work!. :)

I do not want to save ResourceSaveToFile ($ FileName ,...) I want to use from within the executable.

What could be happening?


[COLOR=green]

Share this post


Link to post
Share on other sites
Melba23

novi,

Searching would have found this post in the Resources thread - and you should pay particular attention to Zedna's reply! :)

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

 

Share this post


Link to post
Share on other sites
novi

Thanks @ Melba23

I have examined the post that tells me, all I'll ask anyway @ Zedna's, thank you very much!


[COLOR=green]

Share this post


Link to post
Share on other sites
PsaltyDS

CMD.exe only accepts a valid built in command (like CD) or a path to an executable file. You can't pass it a binary executable. I don't think you can pass execution to a memory image like that at all without getting in to ASM stuff. Execution of what is supposed to be data space is a specific security risk, and a lot of effort goes into preventing it.

Why can't you just save the executable to a file first?

Gives the whole project a malicious air...

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
novi

I understand, I also think that is the problem. But how then can pass the embedded executable path?

I do not want to download the file first because I want to run the program from a CD, for example.

Would greatly appreciate someone to help me, and I have a surprise for everyone if I can do this!

Edited by novi

[COLOR=green]

Share this post


Link to post
Share on other sites
PsaltyDS

... and I have a surprise for everyone if I can do this!

That's exactly what I'm suspicious of, that the whole point of this is to give AutoIt a black eye by malicious behavior that will be "a suprise for everyone".

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
GEOSoft

That's exactly what I'm suspicious of, that the whole point of this is to give AutoIt a black eye by malicious behavior that will be "a suprise for everyone".

:)

I'm withh you on this and if the OP can't provide a valid reason for this code then the moon WILL be made of cheese before he gets another answer from me. Also I don't know what makes him think that any of us are stupid enough to actually run his code anyway.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
novi

Well, well, not alermen, did not say it through anything. I assure you my intentions are good.

The purpose of this script is run 'listF.exe' embedded in the executable. This program is written is C and what it does is list all the functions of a *. dll and return information from them.

The surprise was saying is a file with all functions of the component scilexer.dll I'm writing right now so we can all benefit, you know, one hand washes the other and both hands wash the face.

I feel better, I apologize if I caused trouble!

Edited by novi

[COLOR=green]

Share this post


Link to post
Share on other sites
PsaltyDS

Well, well, not alermen, did not say it through anything. I assure you my intentions are good.

The purpose of this script is run 'listF.exe' embedded in the executable. This program is written is C and what it does is list all the functions of a *. dll and return information from them.

The surprise was saying is a file with all functions of the component scilexer.dll I'm writing right now so we can all benefit, you know, one hand washes the other and both hands wash the face.

I feel better, I apologize if I caused trouble!

So compile your C code as a .dll interface and save it to the disk to run it. You could also research AutoIt's Plug-In facility.

None of that answers why saving it to disk to run it is a problem.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
novi

I think no one understands what I want.

I just want to know how to run a *. exe embedded into the executable and added to it with the directive: # AutoIt3Wrapper_run_after = ResHacker.exe-add% out%,% out %,......

NO need to save first to a temporar directory, ie run from within the script.

Edited by novi

[COLOR=green]

Share this post


Link to post
Share on other sites
PsaltyDS

I think no one understands what I want.

I just want to know how to run a *. exe embedded into the executable and added to it with the directive: # AutoIt3Wrapper_run_after = ResHacker.exe-add% out%,% out %,......

NO need to save first to a temporar directory, ie run from within the script.

I don't think you understand that there are mainly malicious reasons to do it that way. It is very trivial to include an .exe, save it to disk at run time, and execute it. What you are talking about mainly achieves avoidance of virus scanners and malware detection. Surely you wouldn't be trying to do that, so why is it the .exe can't be put on disk for execution?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
novi

Well, I guess I'll be content for now to the implementation of embedded *. exe from outside the script.

Thanks for everything!

I hope to make this script available to the community soon. Thank you!


[COLOR=green]

Share this post


Link to post
Share on other sites
Juvigy

Maybe you can have a look to FileInstall() too...

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
Sign in to follow this  

×