Jump to content

Recommended Posts

Posted

Very nice Zedna!

This is a lot better than FileInstall() which is outdated and in major need of an overhaul.

But there's an issue at hand.. I don't have AutoIt, or Scite4AutoIt installed on my machine, AutoIt it is located in C:\Portables\AutoIt and Scite4AutoIt is in C:\Portables\AutoIt\Scite4AutoIt. I copied reshacker.exe and upx.exe to the path C:\Portables\AutoIt\Scite4AutoIt\AutoIt3Wrapper and in C:\Windows

Try to put it into C:\WINDOWS\system32\

instead of C:\WINDOWS\

  • 2 weeks later...
Posted

NO, you have to save it to disk beofre use.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

I noticed it is on to do list but I have to ask is there a way to load dlls directly from resources...

I thought maybe it is possible already and zedna will just write a function to make it easier for us :P ...

No you are wrong in your ideas.

About DLL files it's the same as about EXE files - you can't run it directly from memory, you must save it to disk firstly.

My functions _ResourceLoadDLL(),_ResourceFreeDLL() on TODO list are meant to preload external EXE/DLL file (from disk to memory)

and then later extract resources from it. It's effective in case you extract more resources from one EXE/DLL.

Posted

No you are wrong in your ideas.

About DLL files it's the same as about EXE files - you can't run it directly from memory, you must save it to disk firstly.

Well... I don't think this is completely true.

♡♡♡

.

eMyvnE

  • 2 weeks later...
Posted

How would I use this feature if I want to embed a .exe file into my complied Script.exe then execute that .exe from within the Script.exe

Or Copy the .exe from within the Script.exe to a specified directory location..??

Posted (edited)

How would I use this feature if I want to embed a .exe file into my complied Script.exe then execute that .exe from within the Script.exe

Or Copy the .exe from within the Script.exe to a specified directory location..??

EXE files can't be executed directly from resources (or memory).

You must save it to disk first with my _ResourceSaveToFile() or native AutoIt;s FileInstall()

Edited by Zedna
Posted

When using AutoIt's FileInstall() will your embedded files always be Automatically dropped to disk once your script.exe is executed..??

Or can you dynamically call for the embedded files to be dropped to disk on demand so then they can be executed or whatnot..??

Does your _ResourceSaveToFile() Function operate in the way I described above..??

Posted

Sorry, but this is false!

Exe files CAN be executed from resource! (Or from memory!)

AutoIt can't do it, but for example C++ or C# do it!

How exactly can you do it then with AutoIt, Execute .exe files from resources or memory..??

Posted

So I ran this bit of code and after compiling it and opening my compiled exe in reshacker I can see the picture I wanted to add but it isn't setting that picture to the control or saving it. What am I doing wrong?

#AutoIt3Wrapper_useupx=n
#AutoIt3Wrapper_Res_File_Add=D:\4sq.jpg, jpg, TEST_JPG_1
#AutoIt3Wrapper_run_after="C:\Program Files (x86)\AutoIt3\Aut2Exe\upx.exe" --best "%out%"

#include <Resources.au3>
#include <WindowsConstants.au3>

$about = GUICreate("About", 471, 675, -1, -1, $WS_CAPTION + $WS_POPUP + $WS_SYSMENU, $WS_EX_TOPMOST)
$Pic1 = GUICtrlCreatePic("", 0, 0, 468, 604)
_ResourceSetImageToCtrl($Pic1, "TEST_JPG_1")
MsgBox(0,"",_ResourceSaveToFile(@ScriptDir & "\test.jpg", "TEST_JPG_1"))
GUISetState()

While 1
    Sleep(500)
WEnd
Posted

So I ran this bit of code and after compiling it and opening my compiled exe in reshacker I can see the picture I wanted to add but it isn't setting that picture to the control or saving it. What am I doing wrong?

#AutoIt3Wrapper_useupx=n
#AutoIt3Wrapper_Res_File_Add=D:\4sq.jpg, jpg, TEST_JPG_1
#AutoIt3Wrapper_run_after="C:\Program Files (x86)\AutoIt3\Aut2Exe\upx.exe" --best "%out%"

#include <Resources.au3>
#include <WindowsConstants.au3>

$about = GUICreate("About", 471, 675, -1, -1, $WS_CAPTION + $WS_POPUP + $WS_SYSMENU, $WS_EX_TOPMOST)
$Pic1 = GUICtrlCreatePic("", 0, 0, 468, 604)
_ResourceSetImageToCtrl($Pic1, "TEST_JPG_1")
MsgBox(0,"",_ResourceSaveToFile(@ScriptDir & "\test.jpg", "TEST_JPG_1"))
GUISetState()

While 1
    Sleep(500)
WEnd
Read my first topic once more.

You must use (generally)

#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, test_1.txt, rcdata, TEST_TXT_1, 0

instead of

#AutoIt3Wrapper_Res_File_Add=Filename [,Section [,ResName]]

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
  • Recently Browsing   0 members

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