Jan Bannister
Jan Bannister

Reputation: 4999

Getting the path of a ClickOnce File Association

I've using ClickOnce and I'm struggling with file associations. I can set up the association. Double-clicking an associated file even launches the application.

...However...

I don't know how to get access to the path of the file clicked to launch the App.

Has anyone come across this before?

Upvotes: 3

Views: 1623

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273854

The official .NET way (w/o Registry) is to look at

AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData

after startup. It is a string[]

Upvotes: 4

Related Questions