[HELP] How To Execute An EXE From Resources?

Discussion in 'Programming & Scripting' started by Tyz512, Aug 12, 2009 with 8 replies and 279 views.

  1. Tyz512

    Tyz512 Enthusiast

    Messages:
    197
    Ratings:
    17
    ahh yes im trying to make an AIO and i have pretty much every feature coded but i just cant seem to figure out how to execute an embedded exe! idc if i have to temporarily extract it and delete it once executed i just need to figure out how to accomplish my goal!


    Also: yes im aware of the "Shell" Function and i could just make folders and put "Shell (pathname)" but that ruins some of the "professionalaty" of the program.
     
  2. Ibdc

    Ibdc Retired Retired

    Messages:
    5,100
    Ratings:
    2,072
    It's more difficult to do it that way. If you want, you could cheat, and have it download all the programs into a specific directory, out of sight of the user, and make it look like they are all embedded because the user can't see where it's being executed from.
     
    • Like Like x 1
  3. OP
    Tyz512

    Tyz512 Enthusiast

    Messages:
    197
    Ratings:
    17
    hmm then i would need a good webserver (mine sucks) and i would need to make a BS progress bar form, ahh but i almost got it, im very close but idk how the guys at game tuts did it for modio (its in the resources and im 95% sure the program was created in VB)
     
  4. Haxalot88

    Haxalot88 VIP VIP

    Messages:
    8,051
    Ratings:
    2,482
    One question, are all of the resource executables managed (ie they run off the .net framework)? If so, I can give you some instructions how to directly run them from a resource.
     
  5. OP
    Tyz512

    Tyz512 Enthusiast

    Messages:
    197
    Ratings:
    17
    actually yes, they are, pm me with the instructions, ill mention you in the special thanks area if it works.

    NVM i found the solution to my problem and it runs the embedded fine for the button i use to run "Modio" heres what i did:

    Code:
    [SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] ButtonX3_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] ButtonX3.Click[/SIZE]
    [SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] data() [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Byte[/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#0000ff]My[/COLOR][/SIZE][SIZE=2].Resources.Modio[/SIZE]
    [SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] file [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.IO.FileStream([/SIZE][SIZE=2][COLOR=#a31515]"Modio.exe"[/COLOR][/SIZE][SIZE=2], IO.FileMode.Create)[/SIZE]
    [SIZE=2]file.Write(data, 0, data.Length)[/SIZE]
    [SIZE=2]file.Close()[/SIZE]
    [SIZE=2][COLOR=#008000]' Runs the resigner program named Modio[/COLOR][/SIZE]
    [SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] p [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Process[/SIZE]
    [SIZE=2]p.StartInfo.FileName = [/SIZE][SIZE=2][COLOR=#a31515]"Modio.exe "[/COLOR][/SIZE]
    [SIZE=2]p.Start()[/SIZE]
    
    [SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
    
    I hope this helps others that read this post.
     
  6. xKNiiVES

    xKNiiVES Enthusiast

    Messages:
    594
    Ratings:
    86
  7. OP
    Tyz512

    Tyz512 Enthusiast

    Messages:
    197
    Ratings:
    17
  8. xKNiiVES

    xKNiiVES Enthusiast

    Messages:
    594
    Ratings:
    86
    Whatever, worked for me and the tutorial was made using vb 08.
     
  9. OP
    Tyz512

    Tyz512 Enthusiast

    Messages:
    197
    Ratings:
    17
    o wow i had no errors in the code and it wasnt working
     

Share This Page