Can an executable program create an executable file?

aman_VB

Member
Joined
Apr 27, 2010
Messages
23
Programming Experience
1-3
Hi all,

I have a program that outputs a file. I want the user to be able to just double-click the output file and launch the program, just like Word and Excel. In Word for instance, one doesn't necessarily have to open WORD then click on File--> Open and locate another Word doc. He can just go to the folder and open the Word doc. I want to implement the exact scenario in my program.

So far I have tried creating TextFile and added it to the Resources. On FormLoading, I simply I stream-read the Resouce file, but I can't write to the Resource on FormClosing, since the Resource is ReadOnly. Also, the Resource is built & compiled so I suppose you can't add anything to it at run time.

How you lunch an output file without launching the Executable program that created it?

Thanks,
Emmanuel
 
File associations can set up using clickonce or setup project, application can read the command line arguments that is passed to it when user opens an associated file.
 
make a blank txt file in resource, and put your exe code, use codedom and your exe will create another exe, you can change the 'yet-to-create-exe' code on the run, just by replacing the txt file commands with what you like
 
Back
Top