Clickonce, <fileAssociation> and passed parameters

  • Thread starter Thread starter Ken Lemieux
  • Start date Start date
K

Ken Lemieux

I've successfully created a file type association between my custom file type
and my application. When users click on a file created using my Clickonce
application, my application opens successfully.

However, what's not clear is how the files path information is passed to the
application. I'm unable to locate any Microsoft documentation that describes
how I might obtain the path information. Would someone please point me to
some documentation that will help me understand the workings of this process?

Furthermore I'm unsure if I should be using Main(string[] args) to get the
file path info or perhaps:
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.
Would someone be able to shed some light on the correct usage for me?

Thanks,
 
It is passed as a commandline argument. I have always retrieved it using
Environment.GetCommandLineArgs() where ever I need the value.
 
I would be interested to know this: If you push an update, and the user
opens the application by clicking on one of his files created using the app,
does it pick up the update?

Thanks,
RobinS.
GoldMail, Inc.
 
Hi Kenneth,

Yes, you're right. When activated via file association, your application
can obtain the file path of the target document from the default
application domain:

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

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
My application is now up and running with Clickonce file association
functionality, and I can tell you that yes a pushed update is recieved when
launching the application from a file, just as if a user had launched the
application from the Start menu.
--
Kenneth Lemieux
Project Engineer
Whelen Engineering Co., Inc.


RobinS said:
I would be interested to know this: If you push an update, and the user
opens the application by clicking on one of his files created using the app,
does it pick up the update?

Thanks,
RobinS.
GoldMail, Inc.
------------------------------------------
Ken Lemieux said:
I've successfully created a file type association between my custom file
type
and my application. When users click on a file created using my Clickonce
application, my application opens successfully.

However, what's not clear is how the files path information is passed to
the
application. I'm unable to locate any Microsoft documentation that
describes
how I might obtain the path information. Would someone please point me to
some documentation that will help me understand the workings of this
process?

Furthermore I'm unsure if I should be using Main(string[] args) to get the
file path info or perhaps:
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.
Would someone be able to shed some light on the correct usage for me?

Thanks,
 
Cool. I don't have need of that at this time, but it's helpful to know for
later...

Thanks,
RobinS.
Goldmail, Inc.
---------------------------------------------------
Ken Lemieux said:
My application is now up and running with Clickonce file association
functionality, and I can tell you that yes a pushed update is recieved
when
launching the application from a file, just as if a user had launched the
application from the Start menu.
--
Kenneth Lemieux
Project Engineer
Whelen Engineering Co., Inc.


RobinS said:
I would be interested to know this: If you push an update, and the user
opens the application by clicking on one of his files created using the
app,
does it pick up the update?

Thanks,
RobinS.
GoldMail, Inc.
------------------------------------------
Ken Lemieux said:
I've successfully created a file type association between my custom
file
type
and my application. When users click on a file created using my
Clickonce
application, my application opens successfully.

However, what's not clear is how the files path information is passed
to
the
application. I'm unable to locate any Microsoft documentation that
describes
how I might obtain the path information. Would someone please point me
to
some documentation that will help me understand the workings of this
process?

Furthermore I'm unsure if I should be using Main(string[] args) to get
the
file path info or perhaps:
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData.
Would someone be able to shed some light on the correct usage for me?

Thanks,
 
Back
Top