Reputation: 15896
I'm using IIS 7.5 on my webserver, and I am creating a C# WPF program that I publish to that server, so that people can download the program.
Right now, people download the program using http://.../Software/Shapeshifter/Setup.exe
However, I would like editors from magazines and so on to be able to make a branded copy of my program, so that they can choose to brand it.
For instance this link:
http://.../Software/Shapeshifter/Setup.exe?brandName=test&brandImage=http://uriToImage.example.com
And then read that from my program when it starts, to brand the application properly.
Currently I am using ClickOnce to do this, since it allows web invocation of such arguments. However, it only works properly in Internet Explorer.
I've been considering the following scenario to solve it:
To make it all a bit more easy, let's just say that my my program is a single .EXE file, and that Setup.exe is actually the program's executable file itself, without any wrapper installers (even though that's not the case).
Any suggestions?
Upvotes: 4
Views: 155
Reputation: 21485
Honestly, I would first just compile a huge string resource in the EXE, something that can be easily identified (very specific HEX combinations), open the EXE as binary file, search for this location and put any data in there. Not exactly beautiful, but should work.
But after a deep digging around the web I finally found a resource editor that is both free and supports execution from command line.
The tool is Resource Hacker. The command line usage is described in the tutorial (search for "Using Scripts in Resource Hacker")
Upvotes: 1