exe在浏览器上运行并且无法正常运行 [英] exe run on browser and its not run correctly

查看:129
本文介绍了exe在浏览器上运行并且无法正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI朋友你怎么样?

当我从浏览器运行我的exe时它运行不正常。你只看到我的代码

当我从我的cmd运行exe时它完全显示我的浏览器和google.com打开但是当我在浏览器上运行时

exname:gau它没有正确显示





第一个注册表值



hkey_class_root

HKEY_CLASSES_ROOT

alert

(默认)=URL:警报协议

URL Protocol =

DefaultIcon

(默认)=test5.exe,1

shell

open

命令

(默认)=d:\.net testing\test5.exe%1



现在看到我的c#代码



名称空间WindowsFormsApplication1

{

静态类程序

{



static void Main(string [] args)

{

if(args.Count()> ; 0)

{



if(args [0] .ToString()==gau)

{

System.Diagnostics.Process.Start(http://www.google。 com);



}



}

其他

{

MessageBox.Show(exe without para);

}

Console.ReadLine();



}

}

}



现在何时我从我的cmd运行exe它完全显示我的浏览器和google.com打开但是当我在浏览器上运行时

exname:gau它没有正确显示

HI Friends How are yoU?
when i m running my exe from browser it is not working properly. you just see my code
when i run exe from my cmd its perfectly show me browser and google.com open but when i run on browser by
exname:"gau"its not show correctly


first registry value

hkey_class_root
HKEY_CLASSES_ROOT
alert
(Default) = "URL:Alert Protocol"
URL Protocol = ""
DefaultIcon
(Default) = "test5.exe,1"
shell
open
command
(Default) = "d:\.net testing\test5.exe" "%1"

now see my c# code

namespace WindowsFormsApplication1
{
static class Program
{

static void Main(string[] args)
{
if (args.Count() > 0)
{

if (args[0].ToString() == "gau")
{
System.Diagnostics.Process.Start(http://www.google.com);

}

}
else
{
MessageBox.Show("exe without para"");
}
Console.ReadLine();

}
}
}

now when i run exe from my cmd its perfectly show me browser and google.com open but when i run on browser by
exname:"gau" its not show correctly

推荐答案

只需将您的注册表项与例如条目进行比较http。

和il:你的参赛作品名为 alert ,这将在网址中使用:

alert:gau

好​​吧,为了更好的诊断,你应该在找不到预期参数时更改Messagebox的文本 - 显示参数的数量和他们的价值!

你会看到协议部分包含在参数中 - 你必须先删除它。
Just compare your registry entry with the entry for e.g. http.
And voilà: your entry is called alert, and that's to be used in the URL:
alert:gau
Well, for better diagnostics, you ought to change the Messagebox's text when the expected parameter is not found - display the number of parameters and their values!
You'll see then that the protocol part is included in the parameter - you have to remove that first.


这篇关于exe在浏览器上运行并且无法正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆