Results 1 to 16 of 16

Thread: [RESOLVED] Generate executables from a VB app?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    [RESOLVED] Generate executables from a VB app?

    I'm just wondering if anyone knows of anywhere that I can find information/code examples on how to get a VB app to create/export a custom executable. Just simple executables for now.

    For example, say I have a program where you type something into an input box, and click a save button, it generates an executable. That new EXE pops up a message box on load that says whatever you typed into the original input box.

    It's sort of difficult to explain, but hopefully I did a good enough job of it.


    Again, I'm not asking for someone to tell me how to program it. I'll figure that part out on my own. I"m just lookign for information on how to achieve something like this. I've seen it done with VB before. I've googled and was unable to turn up anything useful.

    Thanks!
    Last edited by adamsucks; Apr 6th, 2005 at 03:50 PM.

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Generate executables from a VB app?

    Should you find the answer to this, myself and alot of other people would love to look at your code. This question has been asked many times, and noone has found a sure way of doing this properly.

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Generate executables from a VB app?

    Quote Originally Posted by «°°phReAk°°»
    Should you find the answer to this, myself and alot of other people would love to look at your code. This question has been asked many times, and noone has found a sure way of doing this properly.

    Phreak
    If I figure anything out, I'll be sure to share it with the community.

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Generate executables from a VB app?

    It's actually realy easy, give me a minute and I'll write an example for you

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Generate executables from a VB app?

    The compiler has command line options. I've seen code that does it.

  6. #6
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Generate executables from a VB app?

    good Luck

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Generate executables from a VB app?

    Quote Originally Posted by DigiRev
    It's actually realy easy, give me a minute and I'll write an example for you
    WOW... Thanks so much! Looking forward to seeing this.

    Are you making this "new exe" dependant on another file containing instructions? Or will it be 100% standalone? I'm looking for 100% standalone.

    Anyhow, thanks again.

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Generate executables from a VB app?

    You have to have a file to compile. You cannot compile "ME".

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Generate executables from a VB app?

    It writes the instructions to the EXE file itself. The exe you create will require the msvbvm60.dll file like all other VB programs, but that's it. Maybe I could convert it to C++ then it would be completely standalone.

    Edit: run the builder program
    Attached Files Attached Files

  10. #10
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Generate executables from a VB app?

    Doesn't VB SCript allow you to enter "source code like lines" and execute them on the fly? Wouldn't that be the answer to this - I believe I've seens posts about that before.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  11. #11
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Generate executables from a VB app?

    The way I did it is the same way most self-extractors work, except they were written in C++ and require no runtimes...

    Just so you know, you can write data to the end of an EXE file without corrupting it. And have that EXE file read from itself without a "path/file access error"...

    If you ported the EXEFile.exe's source over to C++ which wouldn't be that hard, then it would be standalone.

  12. #12

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    9

    Re: Generate executables from a VB app?

    Quote Originally Posted by DigiRev
    It writes the instructions to the EXE file itself. The exe you create will require the msvbvm60.dll file like all other VB programs, but that's it. Maybe I could convert it to C++ then it would be completely standalone.

    Edit: run the builder program
    Thanks a ton!! That's exactly what I was looking for.

    Amazing.

    Edit:

    What is this:
    Private Const MSG_START As String = ""
    (on my computer it looks like 6 ascii squares..?)

  13. #13
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: [RESOLVED] Generate executables from a VB app?

    It could be exactly what was wanted. I can't download it, but from the looks of it, it just signifies the start of a message. It's not meant to be anything special (ie: symbols).

    Also, You can't make it stand alone completely in VB. The example given is in VB is it not? If it is, then if you give the program to someone, or write an exe with your program and give them the exe, they might not be able to run it. It still requires the VB Runtime. As was stated, C/C++ is the way to go..

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  14. #14
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [RESOLVED] Generate executables from a VB app?

    Couldnt we store the binary data of an exe to a resource then open a new exe file using 'open' then store those binary data into that newly created exe? Wouldnt that work?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  15. #15
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: [RESOLVED] Generate executables from a VB app?

    you have to make the resource when you make the .exe, you can't change the resource file.

  16. #16
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: [RESOLVED] Generate executables from a VB app?

    I assume that the Source (or is it the exe) of EXEFile project is in Builder.RES ?
    How does one, get our own Project into Builder.RES ?

    Thanks,
    Rob C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width