[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

click once command line parameters how to ?

=?Utf-8?B?VG9t?=

4/26/2008 7: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.
Tom
4 Answers

RobinS

4/28/2008 4:33:00 AM

0

Check out this link:
http://msdn2.microsoft.com/en-us/librar...(VS.80).aspx

RobinS.
GoldMail.com

"Tom" <Tom@discussions.microsoft.com> wrote in message
news:2347F472-C173-4B44-9713-11B2F43EED2A@microsoft.com...
>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.
> Tom

=?Utf-8?B?VG9t?=

4/28/2008 10:37:00 PM

0

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

"RobinS" wrote:

> Check out this link:
> http://msdn2.microsoft.com/en-us/librar...(VS.80).aspx
>
> RobinS.
> GoldMail.com
>
> "Tom" <Tom@discussions.microsoft.com> wrote in message
> news:2347F472-C173-4B44-9713-11B2F43EED2A@microsoft.com...
> >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¶m2=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.
> > Tom
>
>

RobinS

4/29/2008 6:30:00 AM

0

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&am...

RobinS.
GoldMail.com
--------------------------------
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:64A698B2-814F-46F5-B7C2-E3B72BE02939@microsoft.com...
> 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
>
> "RobinS" wrote:
>
>> Check out this link:
>> http://msdn2.microsoft.com/en-us/librar...(VS.80).aspx
>>
>> RobinS.
>> GoldMail.com
>>
>> "Tom" <Tom@discussions.microsoft.com> wrote in message
>> news:2347F472-C173-4B44-9713-11B2F43EED2A@microsoft.com...
>> >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¶m2=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.
>> > Tom
>>
>>

MTGSystems

5/1/2008 1:35:00 AM

0

Everybody running this is Vista.

Thanks for your response.


"RobinS" <robins@imnottelling.com> wrote in message
news:SJCdnb2x3NnyXYvVnZ2dnUVZ_gSdnZ2d@comcast.com...
>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&am...
>
> RobinS.
> GoldMail.com
> --------------------------------
> "Tom" <Tom@discussions.microsoft.com> wrote in message
> news:64A698B2-814F-46F5-B7C2-E3B72BE02939@microsoft.com...
>> 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
>>
>> "RobinS" wrote:
>>
>>> Check out this link:
>>> http://msdn2.microsoft.com/en-us/librar...(VS.80).aspx
>>>
>>> RobinS.
>>> GoldMail.com
>>>
>>> "Tom" <Tom@discussions.microsoft.com> wrote in message
>>> news:2347F472-C173-4B44-9713-11B2F43EED2A@microsoft.com...
>>> >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¶m2=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.
>>> > Tom
>>>
>>>
>