Embedding Text within exe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is what I would like to do ..

I have an C# application (App1) that takes a XML file and displays some information, but i dont want the xml file to be seperate ie one .exe file that you run will do what it needs to do

I have app2 that builds the XML file that will be used by App1, i want app2 to embed the xml within app1 and present the user with an exe file

Figure something like an virus wrapper around the exe ?

Any suggestions ???
 
James McC said:
Here is what I would like to do ...

I have an C# application (App1) that takes a XML file and displays
some information, but i dont want the xml file to be seperate ie one
.exe file that you run will do what it needs to do.

I have app2 that builds the XML file that will be used by App1, i
want app2 to embed the xml within app1 and present the user with an
exe file.

Figure something like an virus wrapper around the exe ??

Any suggestions ???

If you can build App1 after App2 has run, you can just embed the
resource inside the exe using the C# compiler using the /res command
line option (or mark the file appropriately as embedded content in
VS.NET).

If you've only got the App1.exe file by the time App2 has run, you
*could* disassemble it and reassemble it with the resource in as well.
I don't know if there's any way of *just* adding a resource to an exe.
 
Jon Skeet said:
If you can build App1 after App2 has run, you can just embed the
resource inside the exe using the C# compiler using the /res command
line option (or mark the file appropriately as embedded content in
VS.NET).

If you've only got the App1.exe file by the time App2 has run, you
*could* disassemble it and reassemble it with the resource in as well.
I don't know if there's any way of *just* adding a resource to an exe.

This applications will be run remote of visual studio as stand alone .exe,
if i remember correctly i can ship the csc.exe without any licensing issues.

James McCutcheon
 
James said:
This applications will be run remote of visual studio as stand alone .exe,
if i remember correctly i can ship the csc.exe without any licensing issues.

You don't need to - the C# compiler is part of the framework.

However, you might be able to find a tool to embed the resource rather
than having to ship the source code and get it built on the client.
 
Back
Top