Is it possible in any possible way to add to/change the .application
file (or another way) of a ClickOnce deploy file to allow parameters to be specified without the need for the parameters to be passed via the URL?
The assembly may be compiled at run time/re-signed/etc, or stated otherwise, I am not worried about the bounds of "what else" I would have to do.
I asked this question to the ClickOnce product team last month, and they said it can be done. Assuming you are targeting .NET 3.5 SP-1, you can pass arguments in to the appref-ms file (the shortcut on the start menu).
MyApp.appref-ms "my arguments"
Then you can retrieve them using this:
string[] activationData = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With