Before publishing I went to Project -> Properties -> Options -> File Associations and added the extension \".hsp\". Set an icon and a ProgID (\"MyCompany.Document.1\" for te
When you publish an app with ClickOnce and then launch it by double-clicking an associated file, the path to that file actually gets stored here:
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0]
See MSDN's documentation for it here:
http://msdn.microsoft.com/en-us/library/system.runtime.hosting.activationarguments.aspx
Plus a tutorial on adding file associations to "Published" projects:
http://blogs.msdn.com/b/mwade/archive/2008/01/30/how-to-add-file-associations-to-a-clickonce-application.aspx