Groups | Blog | Home
all groups > dotnet framework > april 2008 >

dotnet framework : click once command line parameters how to ?



Tom
4/26/2008 12:07:00 PM
I want to pass parameters to a click once application run from the windows
scheduler. I have found several references that tell me these applications
are launced using a URL to the deployment manifest using query string
parameter syntax:
http://mydeploymentserver/MyApplicationFolder/MyApplication.application?param1=foo&param2=bar
2. The question is how can I do that? Is there a way to do this from a .bat
file? Do I need to write an application to send the http request? Is there an
example application somewhere? This seems like something that is common
enough I should not have to write code to get it done. I have found several
examples of how to retrieve this data within my click once applicaton but
none on how to send the request.

Thanks for any ideas.
Have a great week-end.
RobinS
4/27/2008 9:33:16 PM
Check out this link:
http://msdn2.microsoft.com/en-us/library/ms172242(VS.80).aspx

RobinS.
GoldMail.com

[quoted text, click to view]
Tom
4/28/2008 3:37:01 PM
Yes that is one of several places that tell me how to retrieve the query
string. But how do I send it? If it is not yet obvious I have done almost no
WEB development. I think I want to use

WebRequest req =
WebRequest.Create(@"http://servername/...../myprogram.application");

but have not been able to make this work, (404) but I pasted the location in
and changed the direction of the /\. What req.Method do I use for this: POST,
GET or something else? Neither of those seem appropriate for the request.

Thanks for taking a look at this.

Tom

[quoted text, click to view]
RobinS
4/28/2008 11:29:44 PM
I don't know that you can do what you're trying to do. I probably know as
much about web dev as you do. ;-)

One thing to note is that your ClickOnce application needs to be run as
"online only". You can't invoke it from a desktop shortcut and use the
parameters, which might explain why you're having problem.

Another thing to be aware of is if you are using vs2008, anyone running xp
with sp-1 will have problems if you run the app with a different query
string after the 1st time -- there is a reported bug for this. It will be
fixed in VS2008 SP-1. Here's the thread in the forums about it.
http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3255461&SiteID=1

RobinS.
GoldMail.com
--------------------------------
[quoted text, click to view]
MTGSystems
4/30/2008 9:35:01 PM
Everybody running this is Vista.

Thanks for your response.


[quoted text, click to view]

AddThis Social Bookmark Button