Embed files in exe programmatically (pretty hard :( )
-
Hello, I have been struggling for the past 3 days to do this but I simply can't find any good info on how to do it. Please let me explain what I want. I have a compiled software. I want users to be able to brand this software with their own ICON, ABOUT IMAGE and DETAILS. How can I do this ? In my oppinion, there are 2 ways to do this : add the image and details file in to the exe and also, change the exe icon. I don't think this is possible. create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ? PS: I am programming in VS 2008 c# with .net 3.5 Thank you
-
Hello, I have been struggling for the past 3 days to do this but I simply can't find any good info on how to do it. Please let me explain what I want. I have a compiled software. I want users to be able to brand this software with their own ICON, ABOUT IMAGE and DETAILS. How can I do this ? In my oppinion, there are 2 ways to do this : add the image and details file in to the exe and also, change the exe icon. I don't think this is possible. create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ? PS: I am programming in VS 2008 c# with .net 3.5 Thank you
sodevrom wrote:
create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ?
Hello Sodevrom, Generating an .exe (executable) file from within your application is an impossible task! But yes, other executable files can make your way, like files with .vbs and .bat extensions (which are also executable). The source files are written in Notepad as usual and then are saved with a name and a required executable extension. You can use the FileStream property of .NET to create a notepad file and write the code to it. Then, you can use the File.Move(); function to rename the file to any execuatble extension you want, but not any .exe. Hope this information helps. For more information, search Google or MSDN. Happy Programming, Rajdeep.NET :-D
-
Hello, I have been struggling for the past 3 days to do this but I simply can't find any good info on how to do it. Please let me explain what I want. I have a compiled software. I want users to be able to brand this software with their own ICON, ABOUT IMAGE and DETAILS. How can I do this ? In my oppinion, there are 2 ways to do this : add the image and details file in to the exe and also, change the exe icon. I don't think this is possible. create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ? PS: I am programming in VS 2008 c# with .net 3.5 Thank you
Have a look at this article: SlideShowBuilder[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
Have a look at this article: SlideShowBuilder[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
Hello, This is not exactly what I need. A friend of mine made me a DLL a while back, that had 3 functions : start_exe(string exe name) add_file(string file path,string source path) create_exe(icon path,string file_of_the_file_to_run_when_oppening_exe) And it worked perfectly in C++, but it does not work very good in c#. Any other ideeas ?
-
Hello, I have been struggling for the past 3 days to do this but I simply can't find any good info on how to do it. Please let me explain what I want. I have a compiled software. I want users to be able to brand this software with their own ICON, ABOUT IMAGE and DETAILS. How can I do this ? In my oppinion, there are 2 ways to do this : add the image and details file in to the exe and also, change the exe icon. I don't think this is possible. create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ? PS: I am programming in VS 2008 c# with .net 3.5 Thank you
You want to replace resources in an existing .exe file? If the .exe file is a .NET assembly, that's pretty easy. Take a look at Mono.Cecil[^].
-
Hello, I have been struggling for the past 3 days to do this but I simply can't find any good info on how to do it. Please let me explain what I want. I have a compiled software. I want users to be able to brand this software with their own ICON, ABOUT IMAGE and DETAILS. How can I do this ? In my oppinion, there are 2 ways to do this : add the image and details file in to the exe and also, change the exe icon. I don't think this is possible. create an exe from my application, that will automaticaly add in it the Brandable Software File, About Image and Details file. When I run this newly created exe, it can extract the files in a temp file and run the Branded software. How can I do that ? Is there any other way ? Did I explain correctly what I want ? PS: I am programming in VS 2008 c# with .net 3.5 Thank you
-
You want to replace resources in an existing .exe file? If the .exe file is a .NET assembly, that's pretty easy. Take a look at Mono.Cecil[^].
-
Hello, This is pretty difficult. Are you sure this will modify the resources from a .exe from another .exe file. So if I have APP1 that controls APP2, can I modify the resources of APP2 from APP1 ? Thank you
Yes, Cecil can open .exe files, modify them, and save back the changes. Use something like this:
AssemblyDefinition asm = AssemblyFactory.GetAssembly("myassembly.exe");
asm.MainModule.Resources.Add(new EmbeddedResource(
"ResourceName", ManifestResourceAttributes.Public,
File.ReadAllBytes("image.png")
));
AssemblyFactory.SaveAssembly(asm, "myassembly.branded.exe"); -
You want to replace resources in an existing .exe file? If the .exe file is a .NET assembly, that's pretty easy. Take a look at Mono.Cecil[^].