Sign in to follow this  
Followers 0
fly

How can I 'hide' an .exe

11 posts in this topic

The program I'm writing calls another executable. I'd like to be able to hide this exe either inside my program or in a .dll or something. Is there any way to do this?

Share this post


Link to post
Share on other sites



sounds like your looking for FileInstall


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

The program I'm writing calls another executable. I'd like to be able to hide this exe either inside my program or in a .dll or something. Is there any way to do this?

just load the contents of exe[2] into the bottom of exe[1] and just switch gui's if your using em' , or make all of exe[2] a big function in exe[1]

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

here is a real good example using FileInstall()

#include <GUIConstants.au3>

; install the exe
$Program_1 = @TempDir & "\Temp.exe"
FileInstall( @SystemDir & "\notepad.exe", $Program_1)

;Generated with Form Designer preview
$Form1 = GUICreate("Form1", 414, 306, 189, 116, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_CLIPCHILDREN,$WS_BORDER,$WS_CLIPSIBLINGS))
$run_exe = GUICtrlCreateButton("Run installed exe program", 100, 150, 200, 20)

GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $run_exe
        Run($Program_1)
    Case Else
   ;;;;;;;
    EndSelect
WEnd
Exit

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

#include <GUIConstants.au3>

; install the exe

$Program_1 = @TempDir & "\Temp.exe"

FileInstall( @SystemDir & "\notepad.exe", $Program_1)

;Generated with Form Designer preview

$Form1 = GUICreate("Form1", 414, 306, 189, 116, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_CLIPCHILDREN,$WS_BORDER,$WS_CLIPSIBLINGS))

$run_exe = GUICtrlCreateButton("Run installed exe program", 100, 150, 200, 20)

GUISetState(@SW_SHOW)

While 1

    $msg = GuiGetMsg()

    Select

    Case $msg = $GUI_EVENT_CLOSE

        ExitLoop

    Case $msg = $run_exe

        Run($Program_1)

    Case Else

   ;;;;;;;

    EndSelect

WEnd

Exit

@Valuater, untested example?

Only literals for the 1st parameter of FileInstall().

Edited by MHz

Share this post


Link to post
Share on other sites

@Valuater, untested example?

Only literals for the 1st parameter of FileInstall().

yes i tested it

it worked fine

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Yes indeed, fileinstall won't work like that^^:

FileInstall( @SystemDir & "\notepad.exe", $Program_1)

Here the text from the helpfile:

Parameters

source The source path of the file to compile. [b]This must be a literal string; it cannot be a variable.[/b]

But besides that, the example shows everything i think

Felix

Share this post


Link to post
Share on other sites

i know help says that...

but did you test it?

i went ahead and posted it because it worked

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Lol, you're right!

It works.....sorry for that^^

That is strange, the other day i tried to use fileinstall with a file i had in my scriptdir but it didn't work...

Felix

Share this post


Link to post
Share on other sites

You can't compile a script using that syntax. Listen to the help file, it knows more than anybody else about AutoIt.

Share this post


Link to post
Share on other sites

You can't compile a script using that syntax. Listen to the help file, it knows more than anybody else about AutoIt.

Your right Valik... now i remember why it says that

i had that problem once when i tried to compile

thanks

8)


NEWHeader1.png

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  
Followers 0