Results 1 to 3 of 3

Thread: Can an executable program create an executable file?

  1. #1
    aman_VB is offline VB.NET Forum Newbie
    .NET Framework
    .NET 3.5
    Join Date
    Apr 2010
    Posts
    23
    Reputation
    40

    Can an executable program create an executable file?

    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

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,204
    Reputation
    2369
    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.

  3. #3
    bluepig13 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0
    Join Date
    Dec 2012
    Posts
    2
    Reputation
    0
    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

Bookmarks

Posting Permissions

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