|
-
Nov 3rd, 1999, 09:32 AM
#1
Thread Starter
Junior Member
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
-
Nov 3rd, 1999, 09:38 AM
#2
Hyperactive Member
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
-
Nov 3rd, 1999, 12:58 PM
#3
Thread Starter
Junior Member
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?
-
Nov 3rd, 1999, 09:10 PM
#4
Frenzied Member
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
-
Nov 3rd, 1999, 09:17 PM
#5
Frenzied Member
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
-
Nov 4th, 1999, 03:22 AM
#6
Lively Member
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!
-
Nov 7th, 1999, 04:45 PM
#7
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|