Results 1 to 7 of 7

Thread: Making an exe to write an exe... FUN!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 1999
    Posts
    24

    Post

    How can i make an exe write another exe?...
    i tried putting the exe code in a text and then just writing it into a file... but that did not work... so what will work?

    -RoundCow

  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    If all the compiling has been done, then you have open and write it in BINARY form because text sometimes takes out null characters and etc. And why can't you just use FileCopy?

    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470
    AIM: TomY10
    PERL, JavaScript and VB Programmer

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 1999
    Posts
    24

    Post

    well... i can't use file copy because i want it to create the exe... so then everything would be in one file... how do i copy it as a binary?

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    if it is quite a simple exe you want (no graphics etc)
    Write the code for the final program.
    ie form, project file, bas file

    open these files in notepad.

    within your "master" program write code to write this text out to files. (this is a bit awkward because of printing out " marks

    you can then do this
    (ProjectName is the path to your secondry project file)


    Dim strCommand As String
    strCommand = "C:\Program Files\DevStudio\VB\vb5.exe " & Quote & ProjectName & Quote & " /make"
    Shell strCommand

    this will write the exe file by running vb invisably

    you can then delete all the secondary source code files

    If the exact path to vb.exe is not known this can be found....

    Let em know if you need to know how to do this

    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

  5. #5
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    Sorry in that code I forgot to include

    CONST Quote = """"

    you can replace " when writing to a file with & quote &

    a bid clener than using chr$(34)

    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

  6. #6
    Lively Member
    Join Date
    Oct 1999
    Location
    Sheffield, Derbyshire, UK
    Posts
    68

    Post

    Just outa interest , r u trying 2 make a program that sort of evolves? If u r, I would very much like 2 c it!

  7. #7
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    RoundCow,

    Did you solve this one in the end?


    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

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