Click "Once", a question on how to open it with arguments

I created my ClickOnce application, which will install a small application for Windows forms, which consists of a WebBrowser control ... I need to pass some arguments (this is done to install the client) to open it correctly ...

as an example, let's say that I need arg (0) to be the URL to open, if I create a regular installer, I will return to the .exe file, and all I need to do is:

myWebBrowser.exe "http://www.google.com"

but since I use the ClickOnce method, I get

myWebBrowser.appref-ms

if I open it, it contains as usual the URL and other parameters

http://www.myWebSite.com/My.WebBrowser/MyWebBrowser.application#My Web Browser.application, Culture = neutral, PublicKeyToken = 5f83fa0e3f8a8c2b, processorArchitecture = msil

and I cannot pass arguments in it :(

What is the trick for this?

added

I have active settings "Allow Settings"

alt text http://www.balexandre.com/temp/2009-06-15_1051_clickOnceAllowURLs.png

Resources

I found out about this blog post ... I'll try and post my findings

+5
source share
1 answer

You should be able to use the query string as usual ...

http://someserver/folder/some.application?a=b&c=d&e=f

, ( url, ) - System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed - , AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData ( ) () ActivationUri .

+1

All Articles