Monday, 29 January 2007

Well here's one that has me stumped. Basically what I have is a ClickOnce deployed app that is deployed to my client's network. I would like to pass it some command line parameters, but for the life of me cannot get it to work. All the examples I can find are for web-deployed click once apps, but the code given there does not work. For web-deployed apps it's very easy to retrieve the parameters using,

AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0].Query

and parsing out the parameters (normal query string parameters like www.blah.com/myapp.application?param1&param2). However when using the same construct with the network-deployed app, this simply returns the name of the application file (file://myserver/apps/myapp.application?param1&param2 simply returns apps/myapp.application). Trying to pass parameters in any other way results in windows not finding the application file.

Either I'm overlooking something very obvious or there is just no easy way to do this. Luckily this isn't a must have feature for this particular client, just something that would be nice.

Any thoughts or ideas?

Monday, 29 January 2007 09:55:11 (Eastern Standard Time, UTC-05:00) | Comments [0] | .NET#
Search
Archive
Links
Categories
Admin Login
Sign In
Blogroll
Themes
Pick a theme: