ClickOnce application does not start through Process.Start(“x.abc”) with *.abc associated to the ClickOnce application

后端 未结 4 926
心在旅途
心在旅途 2020-12-30 03:02

I have successfully developed and deployed a ClickOnce application which registers an associated file extension, for instance *.abc. When I click on a file name

4条回答
  •  遥遥无期
    2020-12-30 03:46

    Have you tried using ShellExecute(); API?

            [DllImport("Shell32.dll",CharSet=CharSet.Auto)]
        public static extern IntPtr ShellExecute(
            IntPtr hwnd, 
            string lpVerb,
            string lpFile, 
            string lpParameters, 
            string lpDirectory,
            int nShowCmd );
    
    ShellExecute(this.Handle,"open","x.abc","","",3);
    

    You could also try the Shell(); function which is a part of framework

提交回复
热议问题